Fix floating toolbar positioning to ensure it fits within the viewport#21493
Fix floating toolbar positioning to ensure it fits within the viewport#21493LoukasPap wants to merge 1 commit into
Conversation
|
Hello @timvandermeij! Hope the solution is good. I'm open to any suggestion that would make this fix more proper and thus apply it. 🙂 |
|
Did you test your patch in changing LTR to RTL ? in changing the rotation ? |
Yes, I tried it with both a custom RTL file and a downloaded document in Arabic language and it works. |
|
Now that I tested changing the rotation, there are some cases where the toolbar is getting cut off. I'll fix them and re-push. |
|
@calixteman In a rotated page, the popup is also rotated. Is this the correct behavior or not? If it's not, then I think a new issue should open for it and then probably this already PR covers the floating toolbar positioning because it's going to be displayed normally. It remains just to see if the bounds are being updated after the rotation.
|

Fixes issue #20700
When the selected text is very close to the page's edges, it re-positions the floating toolbar accordingly.
The default case where toolbar fits normally the page is:
The exceptional cases are: