-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve compat notes and behavior on popover-hint demo #329
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,32 +31,48 @@ | |
| Menu C | ||
| </button> | ||
| </section> | ||
| </div> | ||
|
|
||
| <p class="help-para"> | ||
| Press the buttons to show the auto popovers. Hover or focus the buttons to | ||
| show the hint popovers. When an auto popover is shown, you can show the | ||
| hint popovers without hiding it. See | ||
| <a | ||
| href="https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#using_hint_popover_state" | ||
| >Using "hint" popover state</a | ||
| > | ||
| for more information. Note that in non-supporting browsers, the position | ||
| of the popovers is broken. | ||
| </p> | ||
| <div id="submenu-1" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| </div> | ||
| <div id="submenu-2" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| </div> | ||
| <div id="submenu-3" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| </div> | ||
|
|
||
| <div id="submenu-1" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| </div> | ||
| <div id="submenu-2" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| </div> | ||
| <div id="submenu-3" popover="auto"> | ||
| <button>Option A</button><br /><button>Option B</button> | ||
| <div id="tooltip-1" class="tooltip" popover="hint">Tooltip A</div> | ||
| <div id="tooltip-2" class="tooltip" popover="hint">Tooltip B</div> | ||
| <div id="tooltip-3" class="tooltip" popover="hint">Tooltip C</div> | ||
|
||
| </div> | ||
|
|
||
| <div id="tooltip-1" class="tooltip" popover="hint">Tooltip A</div> | ||
| <div id="tooltip-2" class="tooltip" popover="hint">Tooltip B</div> | ||
| <div id="tooltip-3" class="tooltip" popover="hint">Tooltip C</div> | ||
| <div class="help-para"> | ||
| <p> | ||
| Press the buttons to show the auto popovers. Hover or focus the buttons | ||
| to show the hint popovers. When an auto popover is shown, you can show | ||
| the hint popovers without hiding it. See | ||
| <a | ||
| href="https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#using_hint_popover_state" | ||
| >Using "hint" popover state</a | ||
| > | ||
| for more information. | ||
| </p> | ||
| <p> | ||
| Note that this demo uses both hint popovers and CSS anchor positioning. | ||
| Browsers that don't support the former will experience different tooltip | ||
| behavior. Browsers that don't support the latter will not see the menus | ||
| and tooltips appear in the correct position relative to each button on | ||
| the button bar. Check browser support for | ||
| <a | ||
| href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/popover#browser_compatibility" | ||
| >hint popovers</a | ||
| > | ||
| and | ||
| <a | ||
| href="https://developer.mozilla.org/en-US/docs/Web/CSS/position-anchor#browser_compatibility" | ||
| >anchor-positioning</a | ||
| >. | ||
| </p> | ||
| </div> | ||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line makes the paragraph unreachable to the cursor, as it’s hidden behind the body: no text selection, no link clicking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, crap, that was foolish! In my next commit I have adjusted the
z-indexvalues to fix this issue.