Fix devtools issues when toolbox uses a <browser> element instead of a content <iframe>
Categories
(DevTools :: General, task, P1)
Tracking
(firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-m1)
Attachments
(3 files)
For Bug 1581925, the devtools toolbox will use a <browser> element instead of an <iframe> with type="content". For now, when devtools.toolbox.content-frame
is set to false, we will still use an <iframe>, but this is being removed in Bug 1585747.
When applying the patches from Bug 1581925, there are a few issues:
- default html context menus appear when right clicking in HTML DevTools panels
- scroll-lock feature is enabled when doing middle click
- shift+F7 triggers the caret browsing popup instead of toggling the style editor
Assignee | ||
Comment 1•6 years ago
|
||
With the removal of ContextMenuSpecialProcessChild.jsm in Bug 1581925, the default HTML context menu will start showing up when right clicking in empty areas of the HTML based DevTools panels.
The toolbox is will catch and stop all context menu events when they are coming from HTML documents.
For XUL panels, we still want context menu events to trigger their default behavior which we use to display custom context menus in those panels.
Assignee | ||
Comment 2•6 years ago
|
||
Depends on D48312
When the DevTools toolbox is using a <browser> element, middle click will start the scroll lock feature on macos and windows.
Catch all middleclick events from the toolbox and preventDefault to avoid this.
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D48313
caret browsing is enabled by the F7 shortcut, and devtools style editor is toggled via shift+F7.
When the DevTools toolbox is using a browser element, using shift+F7 in the toolbox will first trigger caret browsing and then toggle the style-editor.
The DevTools shortcut is added via a XUL key in DevToolsStartup.jsm but I didn't manage to prevent the shift+F7 event from triggering the caret-browsing keypress callback.
So instead, check if shiftKey is true in the caret-browsing callback and bail out.
In theory, unless explicitly supported, the callback should bailout if any modifier is pressed.
Assignee | ||
Comment 4•6 years ago
|
||
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7d309560313a
https://hg.mozilla.org/mozilla-central/rev/73deef02af0c
https://hg.mozilla.org/mozilla-central/rev/fc5adc9d81ef
Updated•6 years ago
|
Updated•4 years ago
|
Description
•