From 5280decb59a3d57c18ab28d9843571e4305ade94 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 21 Jan 2009 22:37:02 +0000 Subject: [PATCH] Bug 568625: Ignore extra whitespace in search svn path=/trunk/; revision=162 --- js/ui/overlay.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/overlay.js b/js/ui/overlay.js index ba7ec0b33..84644da4f 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -99,7 +99,11 @@ Sideshow.prototype = { this._searchEntry.connect('key-press-event', function (se, e) { let code = e.get_code(); if (code == 9) { - me._searchEntry.text = ''; + // A single escape clears the entry, two of them hides the overlay + if (me._searchEntry.text == '') + me.emit('activated'); + else + me._searchEntry.text = ''; return true; } else if (code == 111) { // selectUp and selectDown wrap around in their respective displays