Bug 960248 - Fix range adjustments when on a label. r=yzen

This commit is contained in:
Eitan Isaacson 2014-01-23 10:37:38 -08:00
parent 61df69f208
commit 79adfff128

View File

@ -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);
}
}