-
Notifications
You must be signed in to change notification settings - Fork 426
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown position is incorrect when element enters fullscreen mode #1108
Comments
Clicking the button does nothing on my computer (Chrome/Windows10) |
Sorry about that. It seems an element within an iframe can't make a fullscreen request unless the iframe markup explicitly specifies Please visit https://jsfiddle.net/k7n1tmhw/ , then from dev tools change the iframe ( |
This is an edge-case that is not easily solvable. why are you entering fullscreen mode on an element? |
The application has a lot of UI and it allows users to focus on part of the UI by entering into fullscreen mode. Imagine a stock market application or a dashboard with lots of widgets but you want the user to be able to focus on a specific widget if they want to. |
FYI, locally I changed the while(p){ mentioned above to var root = (document.fullscreenElement ?? document.webkitFullscreenElement ?? document.documentElement);
while (p !== root){ and it worked in normal and fullscreen modes. |
Good idea! I will incorporate that into the code and publish a new release later today |
Thank you @yairEO |
Prerequisites
馃挜 Demo Page
https://jsbin.com/sovoceremu/1
Explanation
Access the above demo page and click the "Fullscreen" button. This should show the UI in fullscreen.
What is the expected behavior?
The dropdown should be positioned correctly when using fullscreen API.
What is happening instead?
The dropdown is not at the correct place.
What error message are you getting?
No errors.
The issue is how the top and left values are calculated at
tagify/src/parts/dropdown.js
Line 289 in e6605ed
Current logic assumes to go all the way to the root. But when an element is requested to be in fullscreen mode, then any parent element of it doesn't matter as far as left/top values are concerned. I am not sure if I can do something in the app so Tagify doesn't have to make any change.
The text was updated successfully, but these errors were encountered: