Skip to content
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

Rect utility does not work well on mobile devices for Window #3926

Closed
oleq opened this issue Oct 9, 2019 · 2 comments
Closed

Rect utility does not work well on mobile devices for Window #3926

oleq opened this issue Oct 9, 2019 · 2 comments
Labels
package:utils resolution:expired This issue was closed due to lack of feedback. status:stale type:bug This issue reports a buggy (incorrect) behavior.

Comments

@oleq
Copy link
Member

oleq commented Oct 9, 2019

Is this a bug report or feature request? (choose one)

🐞 Bug report

💻 Version of CKEditor

master


ATM we use window.innerWidth (Height) to determine the Rect of the window. As it turned out this is not the best way because these properties are wild on mobile devices.

Screenshot 2019-10-09 at 10 57 33

As a result, UI components that rely on smart positioning (getOptimalPosition() helper) and have fitInViewport: true do not work well on mobiles in some cases. They get positioned beyond the boundaries of the visual viewport. That includes dropdown panels but I suppose other balloons are also affected by this issue.

I'm not sure there is a universal solution to the problem (because global properties are acting in a different way depending on the device) but the best solution I found so far is the VisualViewport API which is supported in most of the web browsers and should do the trick.

FYI (If you checked out the screenshot): We cannot simply use window.outerWidth|Height because that would backfire on desktops where these properties include more than just the webpage.

cc @mlewand @Reinmar

@oleq oleq added type:bug This issue reports a buggy (incorrect) behavior. status:confirmed package:utils labels Oct 9, 2019
@Reinmar Reinmar added this to the backlog milestone Nov 18, 2019
@pomek pomek removed this from the backlog milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added the resolution:expired This issue was closed due to lack of feedback. label Nov 5, 2023
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:utils resolution:expired This issue was closed due to lack of feedback. status:stale type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

5 participants