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:
reed%reedloden.com 2008-03-28 08:34:40 +00:00
Родитель 0e1cda65e9
Коммит 5814b84805
3 изменённых файлов: 17 добавлений и 10 удалений

Просмотреть файл

@ -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[
this._userSelecting = true;
this.moveByOffset(aOffset, !aEvent.ctrlKey, aEvent.shiftKey);
this._userSelecting = false;
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>