Bug 1835464 - Check dialog is modal flag instead of open attribute in 'check popover validity' algorithm. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181089
This commit is contained in:
@@ -3276,9 +3276,11 @@ bool nsGenericHTMLElement::CheckPopoverValidity(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsHTMLElement(nsGkAtoms::dialog) && HasAttr(nsGkAtoms::open)) {
|
||||
aRv.ThrowInvalidStateError("Element is an open <dialog> element");
|
||||
return false;
|
||||
if (auto* dialog = HTMLDialogElement::FromNode(this)) {
|
||||
if (dialog->IsInTopLayer()) {
|
||||
aRv.ThrowInvalidStateError("Element is a modal <dialog> element");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (State().HasState(ElementState::FULLSCREEN)) {
|
||||
|
||||
Reference in New Issue
Block a user