Comments (3)
I've opened a PR both of these issues: #1749
The solution to the hover issue is probably best described with a GIF. Since we abstract positioning with <sl-popup>
, I've added <sl-popup hover-bridge>
so other components can benefit from this in the future.
The GIF shows the "safe trapezoids" in orange, but they're invisible normally. Hovering over it will persist the tooltip unless the user presses Esc.
from shoelace.
I fixed the Esc issue in 7364fa1. Regarding the other issue:
It should be possible to move the mouse pointer over the tooltip content without the tooltip disappearing. At the moment, the Tooltip closes as soon as the pointer is moved away from the triggering element.
I see from this document that they call out native title
tooltips.
Examples of additional content controlled by the user agent include browser tooltips created through use of the HTML title attribute [[HTML]].
Interestingly, neither Chrome, Firefox, nor Safari follow this.
https://codepen.io/claviska/pen/QWYVmzW
Nevertheless, I'll see if I can come up with a solution to account for this requirement.
from shoelace.
Esc
key might need a global KeyboardEvent
handler.
Not sure if ...
- ... Shoelace is already using any global handlers
- ... Shoelace is supposed to listen globally for
Esc
- ... I have seen any other library with
Esc
support
Perhaps this could be handled in the docs with a simple example.
If <sl-tooltip
> dispatches bubbling sl-show
/sl-after-show
events,
- users can be told to listen for them
- confirm
event.target
, add anAbortSignal
-cancelableKeyboardEvent
listener (global or scoped) - remove the listener by aborting the above signal on one of the following cases:
sl-hide
from the<sl-tooltip>
KeyboardEvent
with theEsc
key
- confirm
from shoelace.
Related Issues (20)
- sl-range tooltip causes expensive layout recalc even when not visible
- `sl-divider` doesn't render in SvelteKit app using Autoloader HOT 3
- Button Group: Artifact in render in dropdown control HOT 4
- Select: incorrect size rendering in render in dropdown control HOT 1
- Form Controls: Error Messages: Firefox: Error Message Sticky on Page HOT 1
- Shoelace dark styles don't apply to :root, only :host
- Style parts of <sl-popup> within <sl-dropdown> (exportparts) HOT 1
- color-picker - swatch renders duplicate colors HOT 1
- Carousel can only handle proportionally scaling content
- Divider border gets overwritten by TailwindCSS preflight HOT 6
- Focus trapping not being removed correctly HOT 2
- Insufficient contrast between background and UI elements in dark mode HOT 5
- placement="bottom" does not take effect on SlSelect HOT 3
- Long delay to update carousel indicators on mobile HOT 4
- Import as recommended by docs not working HOT 3
- sl-textarea causes "Error in parsing value for height" warning in Firefox HOT 3
- Shoelace element lost styles under the Chrome screen reader HOT 3
- Checkbox in sub-menu cannot be changed HOT 2
- sl-select throws exception if a sl-input in the same form receives a new value with autofill in MS Edge HOT 1
- White stripe on the right side of the page when having an open `sl-drawer` or `sl-dialog` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shoelace.