Navigation block: put navigation menu container in body#69665
Navigation block: put navigation menu container in body#69665
body#69665Conversation
|
Size Change: +230 B (+0.01%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
I'd love to collaborate with you on using |
Thanks! I did open a draft to use Oh, I also just came across #68755 it would appear to be much like your branch but also aiming to make the submenus use the Popover API. I think moving forward with your PR seems best. It seems we could restore the focus trapping (for now) and still get the benefits of no JS required to open/close the dialog. It would fix #69363. I have it rebased locally and would be glad to take a look at getting the E2E tests passing. |
|
Great! I was thinking actually of going to |
|
I don’t have too strong an opinion on the approach. At first I was fully aboard for the modal Ultimately, if the modal It’d be good to involve some more folks on which approach is most favorable. If we want to go with the modal |
|
This approach is feasible but I’m closing it in favor of #69720. |
Status
Drafted because:
<dialog>elementWhat?
Closes #69635
Ensures the Navigation block’s overlaid menu container is not confined by its parent/ancestor boxes.
Why?
The overlaid content is expected to behave as a root/top level element able to overlay the entire document.
How?
In the editor this uses
createPortalto make the container a child of thebodyelement. In the front end this usesappendChildto do the same.Testing Instructions
#69635 is an issue that is reproducible in Firefox or Safari so test with one of those browsers.
Here is markup for testing, though you’ll have to update the navigation for your site.
Screenshots or screencast
Editor
editor-nav-overlay-before.mp4
editor-nav-overlay-after.mp4
Front end
front-end-nav-overlay-before.mp4
front-end-nav-overlay-after.mp4