Make the document blocked by the topmost element in the top layer

Assigned to



DOM: Core & HTML
2 years ago
a year ago


(Reporter: xidorn, Assigned: ntim)


(Blocks: 2 bugs)

Dependency tree / graph

Firefox Tracking Flags

(firefox43 affected)


We have resolved that, if there is anything in the top layer, we should mark the document blocked by the topmost element in the top layer.

This behavior hasn't been speced yet, but it would be speced in the HTML spec and have a pointer from the Fullscreen API spec. [1]

The HTML spec has defined a "blocked by modal dialog" concept [2], which would be extended to also cover fullscreen.



a year ago
Assignee: nobody → ntim.bugs


a year ago
Blocks: 1322939

Comment 1

a year ago
Just noting down here the broad outline of the work I need to do:
- Implement pending dialog stack
 -> ViewportFrame.cpp

- Create a getter for the active modal dialog
 -> nsIDocument

- Implement inert subtrees
 -> :-moz-inert pseudo-selector (chrome-only) with a bunch of CSS:
*|*:-moz-inert {
    pointer-events: none;
    -moz-user-focus: none;
    -moz-user-input: disabled;
    -moz-user-modify: read-only;
    -moz-user-select: none;
 -> Might need some extra code for keyboard focus

- Wire everything up together
 -> :-moz-modal-dialog pseudo-selector (chrome-only) with a bunch of css:
dialog:-moz-modal-dialog {
  -moz-top-layer: top !important;

dialog:-moz-modal-dialog::backdrop {
  background: rgba(0,0,0,0.1);
You need to log in before you can comment on or make changes to this bug.