diff --git a/res/css/structures/_SearchBox.scss b/res/css/structures/_SearchBox.scss
index 6f08fd47b2..35b0853321 100644
--- a/res/css/structures/_SearchBox.scss
+++ b/res/css/structures/_SearchBox.scss
@@ -9,60 +9,15 @@ You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+widows: THOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
-.mx_SearchBox {
- height: 24px;
- margin-left: 16px;
- margin-right: 16px;
- padding-top: 24px;
- padding-bottom: 22px;
-
- border-bottom: 1px solid $panel-divider-color;
-
- display: flex;
-}
-
-.mx_SearchBox_searchButton {
- margin-right: 10px;
- margin-top: 5px;
- pointer-events: none;
-}
-
.mx_SearchBox_closeButton {
cursor: pointer;
- margin-top: -5px;
-}
-
-.mx_SearchBox_search {
- flex: 1 1 auto;
- width: 0px;
- font-family: $font-family;
- font-size: 12px;
- margin-top: -2px;
- height: 24px;
- border: 0px ! important;
- /* border-bottom: 1px solid rgba(0, 0, 0, 0.1) ! important; */
- border: 0px;
-}
-
-.mx_SearchBox_minimise,
-.mx_SearchBox_maximise {
- margin-top: 3px;
- cursor: pointer;
-}
-
-.mx_SearchBox_minimise {
- margin-left: 10px;
-}
-
-.mx_SearchBox_maximise {
- margin-left: 9px;
-}
-
-.mx_SearchBox object {
- pointer-events: none;
+ background-image: url('../../img/icons-close.svg');
+ background-repeat: no-repeat;
+ width: 16px;
+ height: 16px;
}
diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js
index 84642a12a6..fc5b5eea5e 100644
--- a/src/components/structures/LeftPanel.js
+++ b/src/components/structures/LeftPanel.js
@@ -171,6 +171,12 @@ const LeftPanel = React.createClass({
this.setState({ searchFilter: term });
},
+ onSearchCleared: function(source) {
+ if (source === "keyboard") {
+ dis.dispatch({action: 'focus_composer'});
+ }
+ },
+
collectRoomList: function(ref) {
this._roomList = ref;
},
@@ -195,7 +201,7 @@ const LeftPanel = React.createClass({
);
const searchBox = !this.props.collapsed ?
-