# HG changeset patch # User Suyash Agarwal # Date 1376569849 14400 # Thu Aug 15 08:30:49 2013 -0400 # Node ID c7d7d1e75f65237e5ada1e6d14ecc9088630784b # Parent cf532c57aaa6f1dc7f0dd161afb729c8f9bd2400 Bug 135019 - Inline autocomplete: single backspace deletes the last character typed along with the suggestion. r=Neil diff --git a/suite/components/autocomplete/resources/content/autocomplete.xml b/suite/components/autocomplete/resources/content/autocomplete.xml --- a/suite/components/autocomplete/resources/content/autocomplete.xml +++ b/suite/components/autocomplete/resources/content/autocomplete.xml @@ -868,16 +868,23 @@ case KeyEvent.DOM_VK_PAGE_UP: case KeyEvent.DOM_VK_PAGE_DOWN: case KeyEvent.DOM_VK_UP: if (!aEvent.ctrlKey && !aEvent.metaKey) { this.clearTimer(); killEvent = this.keyNavigation(aEvent); } break; + + case KeyEvent.DOM_VK_BACK_SPACE: + if (!aEvent.ctrlKey && !aEvent.altKey && !aEvent.shiftKey && + this.mDefaultMatchFilled) { + this.mDefaultMatchFilled = false; + this.value = this.currentSearchString.substring(0, this.selectionStart); + } } if (killEvent) { aEvent.preventDefault(); aEvent.stopPropagation(); } return true;