зеркало из https://github.com/mozilla/pjs.git
Bug 385374 - "After performing an operation to the selected richlistitem, it is no longer focused" [p=dao@mozilla.com (D��o Gottwald) r=Neil a=blocking1.9+]
This commit is contained in:
Родитель
0e1cda65e9
Коммит
5814b84805
|
@ -149,6 +149,7 @@
|
|||
(event.keyCode == KeyEvent.DOM_VK_RIGHT &&
|
||||
document.defaultView.getComputedStyle(this.parentNode, "")
|
||||
.direction == "rtl")) {
|
||||
event.preventDefault();
|
||||
window.document.commandDispatcher.rewindFocus();
|
||||
return;
|
||||
}
|
||||
|
@ -160,6 +161,7 @@
|
|||
(event.keyCode == KeyEvent.DOM_VK_LEFT &&
|
||||
document.defaultView.getComputedStyle(this.parentNode, "")
|
||||
.direction == "rtl")) {
|
||||
event.preventDefault();
|
||||
window.document.commandDispatcher.advanceFocus();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -545,9 +545,12 @@
|
|||
<parameter name="aEvent"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (!aEvent.getPreventDefault()) {
|
||||
this._userSelecting = true;
|
||||
this.moveByOffset(aOffset, !aEvent.ctrlKey, aEvent.shiftKey);
|
||||
this._userSelecting = false;
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -580,22 +583,22 @@
|
|||
<handlers>
|
||||
<handler event="keypress" keycode="VK_UP" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(-1, event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" keycode="VK_DOWN" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(1, event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" keycode="VK_HOME" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(-this.currentIndex, event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" keycode="VK_END" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(this.getRowCount() - this.currentIndex - 1, event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" keycode="VK_PAGE_UP" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(this.scrollOnePage(-1), event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="control shift any"
|
||||
action="this._moveByOffsetFromUserEvent(this.scrollOnePage(1), event);"
|
||||
phase="target" preventdefault="true"/>
|
||||
group="system"/>
|
||||
<handler event="keypress" key=" " modifiers="control" phase="target">
|
||||
<![CDATA[
|
||||
if (this.currentItem && this.selType == "multiple")
|
||||
|
|
|
@ -49,8 +49,10 @@
|
|||
event.charCode > 0)) {
|
||||
// Moving relative to an item: start from the currently selected item
|
||||
this.menuBoxObject.activeChild = this.mSelectedInternal;
|
||||
if (this.menuBoxObject.handleKeyPress(event))
|
||||
if (this.menuBoxObject.handleKeyPress(event)) {
|
||||
this.menuBoxObject.activeChild.doCommand();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
|
|
Загрузка…
Ссылка в новой задаче