Bug 255116: Pressing Home or Shift+Home should close the autocomplete dropdown, patch by Jesse Ruderman <jruderman@gmail.com>, r+a=mconnor
git-svn-id: svn://10.0.0.236/trunk@177634 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -421,10 +421,14 @@ nsAutoCompleteController::HandleKeyNavigation(PRUint16 aKey, PRBool *_retval)
|
||||
} else
|
||||
StartSearchTimer();
|
||||
}
|
||||
} else if (aKey == nsIAutoCompleteController::KEY_LEFT ||
|
||||
aKey == nsIAutoCompleteController::KEY_RIGHT)
|
||||
} else if ( aKey == nsIAutoCompleteController::KEY_LEFT
|
||||
|| aKey == nsIAutoCompleteController::KEY_RIGHT
|
||||
#ifndef XP_MACOSX
|
||||
|| aKey == nsIAutoCompleteController::KEY_HOME
|
||||
#endif
|
||||
)
|
||||
{
|
||||
// The user hit a left or right arrow key
|
||||
// The user hit a text-navigation key.
|
||||
PRBool isOpen;
|
||||
mInput->GetPopupOpen(&isOpen);
|
||||
if (isOpen) {
|
||||
|
||||
@@ -380,6 +380,9 @@
|
||||
case KeyEvent.DOM_VK_RIGHT:
|
||||
cancel = this.mController.handleKeyNavigation(IController.KEY_RIGHT);
|
||||
break;
|
||||
case KeyEvent.DOM_VK_HOME:
|
||||
cancel = this.mController.handleKeyNavigation(IController.KEY_HOME);
|
||||
break;
|
||||
case KeyEvent.DOM_VK_PAGE_UP:
|
||||
cancel = this.mController.handleKeyNavigation(IController.KEY_PAGE_UP);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user