mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 960248 - Fix range adjustments when on a label. r=yzen
This commit is contained in:
parent
61df69f208
commit
79adfff128
@ -343,13 +343,14 @@ function scroll(aMessage) {
|
||||
|
||||
function adjustRange(aMessage) {
|
||||
function sendUpDownKey(aAccessible) {
|
||||
let evt = content.document.createEvent('KeyboardEvent');
|
||||
let keycode = aMessage.json.direction == 'forward' ?
|
||||
content.KeyEvent.DOM_VK_DOWN : content.KeyEvent.DOM_VK_UP;
|
||||
evt.initKeyEvent(
|
||||
"keypress", false, true, null, false, false, false, false, keycode, 0);
|
||||
if (aAccessible.DOMNode) {
|
||||
aAccessible.DOMNode.dispatchEvent(evt);
|
||||
let acc = Utils.getEmbeddedControl(aAccessible) || aAccessible;
|
||||
if (acc.DOMNode) {
|
||||
let evt = content.document.createEvent('KeyboardEvent');
|
||||
let keycode = aMessage.json.direction == 'forward' ?
|
||||
content.KeyEvent.DOM_VK_DOWN : content.KeyEvent.DOM_VK_UP;
|
||||
evt.initKeyEvent(
|
||||
"keypress", false, true, null, false, false, false, false, keycode, 0);
|
||||
acc.DOMNode.dispatchEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user