-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discuss allowing extensions to reliably draw over pages #235
Comments
From @dotproto:
|
Dialog showModal has a lot of the properties that extensions want; however the page can call showModal after the extension and essentially click-jack the interface the extension wishes to present to the user.
|
Note that this is already the case for the full screen API -- that is, an extension needs to listen for fullscreen events and move their UI to be a descendant of |
The concept of overlaying content on top of the current page (not necessarily embedded in the page) has come up many times before. Here's a feature request in Firefox for the generic functionality without any prescribed mechanism: https://bugzilla.mozilla.org/show_bug.cgi?id=1340930 Question to the extension devs here: Would |
I think there are distinct use cases which aren't solved by openPopup, and would benefit greatly from the sort of thing proposed in that issue. In the case of 1Password, we want to show UI directly below input fields as this is an established UI pattern for offering field suggestions. We also have cases where we want to show notifications offering the user a suggested action without stealing focus away from the page. It feels like drawing to the screen is a big part of allowing extensions to innovate. I could imagine, for example, an accessibility extension which highlights regions of the page to help someone navigate. Something at a higher level than the main DOM would be really exciting because as @jonathanKingston mentioned, there's real scope for clickjacking issues when extensions are forced to put themselves in the DOM and compete with other scripts on the page to make sure they appear highest in the stacking order. |
Pop-up dictionaries have similar requirements. That is, they need to pop-up next to or below the word being selected/hovered and typically without affecting the page's focus. |
There is a new experiment(origin trial) Web API: Pop-up. Maybe this API can solve the problem in web pages. Outside of web pages, like |
I opened an issue about this in the open-ui group (openui/open-ui#626) since I was curious to see if they wanted to tackle it together. They agreed it was an interesting problem but don't have the bandwidth to tackle it, so I think this is a good one to continue working on ourselves. IIRC the action item from the last time this was discussed at a meeting was putting together an API proposal. |
As discussed in today's meeting, browsers are already able to draw over pages via the dev tools. It would be great to expose this capability without having to alter the host page. Example: Safari's dev tools drawn on this very page. If this UI is painted via a standard "transparent" |
Many extensions have a need to draw UI over the page. Developers have traditionally relied on the stacking context and specific properties like
z-index
. These have always been limited but for the most part, do the job.With the introduction of modals (via the
<dialog>
element), web developers can now draw to a new "top layer" that renders above everything else. Example: https://codepen.io/oliverdunk/pen/xxWKjOZ. This makes it much harder for extension developers as they now have to ensure UI is inside of the highest modal, and this could involve repeatedly moving their UI between DOM elements.The ideal solution here would be a standardized mechanism - maybe a new layer - that extensions could put UI on. This would be reliable even as new standards are developed and provide the most robust long-term solution.
The text was updated successfully, but these errors were encountered: