-
Notifications
You must be signed in to change notification settings - Fork 514
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
Track Spotlight border-radius #562
Comments
Stale issue message |
hey @kfritsch I'll upgrade some dependencies in the next week and take a look at this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Idea
The handleMouseMove listener should respect the spotlight border-radius when deciding whether the mouse hovers the spotlight or not. When doing this it would probably be a good idea to give the spotlight per default the same border-radius as the highlighted container.
Motivation
If I am not mistaken this would follow the W3C Recommendation for Border Clipping.
Not tracking the border radius has unwanted side effect in certain scenarios because the spotlighted elements do behave according to this recommendation. Consider the case, where you want to spotlight a Modal with a significant border-radius. Clicks outside of the Modal close the Modal which shall be prevented by the overlay. Right now clicking inside the clipped area of the border radius triggers the closing of the modal thereby breaking the Joyride.
Implemetation Suggestion
Check if the mouse is in the spotlight rectangle (as is done right now). If so, check for each corner if the mouse is in the rectangle of the size of the respective border radius lengths. If so, check if the mouse is in the quarter ellipse of the border radius lengths with the origin being the inner corner of a corner rectanlge.
This pen contains example code.
The text was updated successfully, but these errors were encountered: