[Q/A] How to anchor a CSUI without requiring the user to scroll #248
-
What is the example you wish to see?Anchor a react component to a specific element, without requiring the user to scroll first. Is there any context that might help us understand?For the documentation of
This results in my UI element first appearing at the top left of the page - and only when the user scrolls, the component rightly appears at the position I need it to be. However, I don't anticipate my users scrolling the page - how can I go about ensuring that the react component shows up exactly where I want it to? Is the function that calculates the position exported for us to reuse and call when we want to? Or is there a different approach to take here. Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Try using this method: https://docs.plasmo.com/browser-extension/content-scripts-ui#watchoverlayanchor The scroll event is a naive implementation and the easiest to trigger for most case when mounting overlay csui, but you can provide your own observer/watcher |
Beta Was this translation helpful? Give feedback.
Try using this method: https://docs.plasmo.com/browser-extension/content-scripts-ui#watchoverlayanchor
The scroll event is a naive implementation and the easiest to trigger for most case when mounting overlay csui, but you can provide your own observer/watcher