зеркало из https://github.com/mozilla/gecko-dev.git
Bug 682618 - Explicitly blur and focus elements to ensure IsCommandEnabled calls are dispatched to correct element. r=gavin
This commit is contained in:
Родитель
1def173012
Коммит
1ee7b4f136
|
@ -27,6 +27,10 @@ function openContextMenuFor(element, shiftkey) {
|
|||
// Context menu should be closed before we open it again.
|
||||
is(contextMenu.state, "closed", "checking if popup is closed");
|
||||
|
||||
if (lastElement)
|
||||
lastElement.blur();
|
||||
element.focus();
|
||||
lastElement = element;
|
||||
var eventDetails = { type : "contextmenu", button : 2, shiftKey : shiftkey };
|
||||
synthesizeMouse(element, 2, 2, eventDetails, element.ownerDocument.defaultView);
|
||||
}
|
||||
|
@ -555,7 +559,7 @@ function runTest(testNum) {
|
|||
|
||||
|
||||
var testNum = 1;
|
||||
var subwindow, chromeWin, contextMenu;
|
||||
var subwindow, chromeWin, contextMenu, lastElement;
|
||||
var text, link, mailto, input, img, canvas, video_ok, video_bad, video_bad2,
|
||||
iframe, textarea, contenteditable, inputspell, pagemenu;
|
||||
|
||||
|
@ -577,6 +581,8 @@ function startTest() {
|
|||
return;
|
||||
}
|
||||
|
||||
lastElement = null;
|
||||
|
||||
text = subwindow.document.getElementById("test-text");
|
||||
link = subwindow.document.getElementById("test-link");
|
||||
mailto = subwindow.document.getElementById("test-mailto");
|
||||
|
|
Загрузка…
Ссылка в новой задаче