зеркало из https://github.com/mozilla/pjs.git
Bug 440515 Allow up/down arrows to be home/end on the Mac r=Standard8,stefanh [p=Neil]
(from) Bug 443837 - Get SeaMonkey/Thunderbird patches from cvs trunk into mozilla-central
This commit is contained in:
Родитель
d890ad7495
Коммит
6667426271
|
@ -1040,14 +1040,25 @@
|
|||
k == KeyEvent.DOM_VK_UP || k == KeyEvent.DOM_VK_DOWN ||
|
||||
k == KeyEvent.DOM_VK_PAGE_UP || k == KeyEvent.DOM_VK_PAGE_DOWN)
|
||||
{
|
||||
// up/down keys while menu is closed will open menu
|
||||
if (!this.mMenuOpen) {
|
||||
// Original xpfe style was to allow the up and down keys to have
|
||||
// their default Mac action if the popup could not be opened.
|
||||
// For compatibility for toolkit we now have to predict which
|
||||
// keys have a default action that we can always allow to fire.
|
||||
if (/Mac/.test(navigator.platform) &&
|
||||
((k == KeyEvent.DOM_VK_UP &&
|
||||
(this.selectionStart != 0 ||
|
||||
this.selectionEnd != 0)) ||
|
||||
(k == KeyEvent.DOM_VK_DOWN &&
|
||||
(this.selectionStart != this.value.length ||
|
||||
this.selectionEnd != this.value.length))))
|
||||
return false;
|
||||
if (this.currentSearchString != this.value) {
|
||||
this.processInput();
|
||||
return true;
|
||||
}
|
||||
if (this.view.rowCount < this.minResultsForPopup)
|
||||
return false;
|
||||
return true; // used to be false, see above
|
||||
|
||||
this.mNeedToFinish = true;
|
||||
this.openResultPopup();
|
||||
|
|
Загрузка…
Ссылка в новой задаче