Simplify popover=hint behaviours & related spec fixes#12345
Simplify popover=hint behaviours & related spec fixes#12345jakearchibald wants to merge 10 commits intomainfrom
Conversation
| <p>To <dfn export data-x="hide-all-popovers-until">hide all popovers until</dfn>, given an <span | ||
| data-x="HTML elements">HTML element</span> or <code>Document</code> <var>endpoint</var>, a boolean | ||
| <var>focusPreviousElement</var>, and a boolean <var>fireEvents</var>:</p> | ||
| <p>To <dfn>hide popover stack until</dfn>, given an <span data-x="html elements">HTML |
There was a problem hiding this comment.
This needed a rewrite. The previous version looped the wrong way, and assumed popoverList was 'live'.
|
I'll sort out the wrapping after reviews & changes. |
|
Btw https://github.com/domfarolino/specfmt is quite useful for the wrapping. |
|
@lukewarlow haha your deleted comment did reveal a bug! It wasn't the |
av1.mp4@mfreed7 sorry for another video, but I don't think I'd be able to describe it well. What do you see as the intended behaviour here? https://random-stuff.jakearchibald.com/bug-repros/popover-show-on-hide-warning/ - here's the demo page. Edit: I'm not convinced my spec totally solves this either, as hiding a popover hides child popovers, which would include the new ones added, and they'd be hidden with events. Maybe. |
| <var>focusPreviousElement</var>, and a boolean <var>fireEvents</var>:</p> | ||
| <p>To <dfn>hide popover stack until</dfn>, given an <span data-x="html elements">HTML | ||
| element</span> or null <var>endpoint</var>, <code>Document</code> <var>document</var>, | ||
| an <span data-x="attr-popover-auto-state">Auto</span> or <span data-x="attr-popover-hint-state">Hint</span> <var>stackType</var>, |
There was a problem hiding this comment.
I guess we have precedent for using attribute state as a parameter and it's probably reasonable as it's the result of a computation so doesn't depend on any other state.
There was a problem hiding this comment.
Yeah, I was unsure about this. I don't mind doing something else.
| data-x="attr-popover-auto-state">Auto</span> state or <var>endpoint</var>'s <code | ||
| data-x="attr-popover">popover</code> attribute is in the <span | ||
| data-x="attr-popover-hint-state">Hint</span> state.</p></li> | ||
| <li><p>Reverse <var>toHide</var>.</p></li> |
There was a problem hiding this comment.
Reverse also needs an issue or link if it already exists.
There was a problem hiding this comment.
There was a problem hiding this comment.
Reminder to self: When I incorporate this, it returns a new list rather than mutating the current list.
|
@mfreed7 can you create a PR for your tests so far? |
(See WHATWG Working Mode: Changes for more details.)
Fixes #12304
/interactive-elements.html ( diff )
/popover.html ( diff )