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

fix: refresh wysiwyg position on canvas resize #3008

Merged
merged 1 commit into from Feb 11, 2021

Conversation

dwelle
Copy link
Member

@dwelle dwelle commented Feb 10, 2021

Replaced resize with ResizeObserver. This will ensure that wysiwyg position is refreshed when canvas is resized via other means, such as updating dimensions or offsets from the host app.

fix #2921 (kinda)

@vercel
Copy link

vercel bot commented Feb 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/j9qevayu4
✅ Preview: https://excalidraw-git-refreshwysiwygoncanvasresize.excalidraw.vercel.app

Copy link
Member

@ad1992 ad1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in host it's working fine.
In mobile keypad still pops up on top of the text editor

@dwelle
Copy link
Member Author

dwelle commented Feb 11, 2021

In mobile keypad still pops up on top of the text editor

Yea, I realized that the mobile UX will need a different fix: scroll canvas down so that the text is rendered above the keyboard. For another PR.

@dwelle dwelle merged commit 4b253c7 into master Feb 11, 2021
@dwelle dwelle deleted the refresh_wysiwyg_on_canvas_resize branch February 11, 2021 11:24
@excalidraw excalidraw deleted a comment from jsx150 Feb 28, 2021
@excalidraw excalidraw deleted a comment from jsx150 Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text not submitted when resizing
2 participants