mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 1259228 - Fix shortcut bug in performance tools r=jsantell
This commit is contained in:
parent
7729b75894
commit
d5b8bff9fd
@ -118,6 +118,14 @@ var PerformanceView = {
|
||||
* "empty", "recording", "console-recording", "recorded".
|
||||
*/
|
||||
setState: function (state) {
|
||||
// Make sure that the focus isn't captured on a hidden iframe. This fixes a
|
||||
// XUL bug where shortcuts stop working.
|
||||
const iframes = window.document.querySelectorAll('iframe');
|
||||
for (let iframe of iframes) {
|
||||
iframe.blur();
|
||||
}
|
||||
window.focus();
|
||||
|
||||
let viewConfig = this.states[state];
|
||||
if (!viewConfig) {
|
||||
throw new Error(`Invalid state for PerformanceView: ${state}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user