mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 14:44:26 +00:00
Bug 1272179 - reset focus whenever the sidebar is hidden. r=bgrins
MozReview-Commit-ID: FxnbMyEuTzw --HG-- extra : rebase_source : c736bf92cc87cf160cdb97f81e46a605bf695ef4
This commit is contained in:
parent
8c3ca46ed3
commit
b9f4e16eb6
@ -496,6 +496,7 @@ ToolSidebar.prototype = {
|
||||
hide: function() {
|
||||
Services.prefs.setIntPref("devtools.toolsidebar-width." + this._uid, this._tabbox.width);
|
||||
this._tabbox.setAttribute("hidden", "true");
|
||||
this._panelDoc.activeElement.blur();
|
||||
|
||||
this.emit("hide");
|
||||
},
|
||||
|
@ -118,7 +118,12 @@ function test() {
|
||||
ok(true, "received 'unselected' event");
|
||||
panel.sidebar.once("tab2-selected", function() {
|
||||
ok(true, "received 'selected' event");
|
||||
tabs[1].focus();
|
||||
is(panel.sidebar._panelDoc.activeElement, tabs[1],
|
||||
"Focus is set to second tab");
|
||||
panel.sidebar.hide();
|
||||
isnot(panel.sidebar._panelDoc.activeElement, tabs[1],
|
||||
"Focus is reset for sidebar");
|
||||
is(panel.sidebar._tabbox.getAttribute("hidden"), "true", "Sidebar hidden");
|
||||
is(panel.sidebar.getWindowForTab("tab1").location.href, tab1URL, "Window is accessible");
|
||||
testRemoval(panel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user