Is there a way to force the spotlight to update without resizing/moving the mouse? #630
-
I'm spotlighting some content that is clamped at 2 visible lines, with a "more" toggle to view the additional content. When the content is expanded, the spotlight does not resize until I move the mouse. Is there a way to force the spotlight to resize upon clicking the "more" toggle? Screen.Cast.2021-01-12.at.2.58.51.PM.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Did you try to dispatch a window resize event? |
Beta Was this translation helpful? Give feedback.
-
Nice! I hadn't thought to just manually trigger the event. Appreciate the help @gilbarbara! |
Beta Was this translation helpful? Give feedback.
-
For those who don't know "dispatch a window resize event" mean, just add the line below to the onClick function of the button that changes the size of content. window.dispatchEvent(new Event('resize')); |
Beta Was this translation helpful? Give feedback.
-
this is a good question that I think they must documented it |
Beta Was this translation helpful? Give feedback.
Did you try to dispatch a window resize event?