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 Menu bubble position #228

Merged
merged 4 commits into from
Apr 30, 2019

Conversation

Chrissi2812
Copy link
Contributor

@Chrissi2812 Chrissi2812 commented Mar 7, 2019

Bug

EditorView.cordsAtPos returns wrong cordinates if we are at a linebreak.
wrong-position-2

Fixed

right-position

This will fix #215

@Chrissi2812 Chrissi2812 marked this pull request as ready for review March 7, 2019 17:21
@pangrr
Copy link

pangrr commented Mar 12, 2019

Anyone can review this? It's really helpful.

@Chrissi2812
Copy link
Contributor Author

As mentioned by @bvkimball in #239 the menuBubble was sometimes placed outside the editor bounding box.

When enabled via:

<editor-menu-bubble :editor="editor" :keepInBounds="true">

It will keep the menuBubble inside it's offsetParent element.

Currently the keepInBounds option is NOT reactive.
This will be part of another PR because this involved a rewrite of the Plugin to an Extension so it's handled by the ExtensionManager.

@philippkuehn philippkuehn merged commit 0e6efc3 into ueberdosis:master Apr 30, 2019
@philippkuehn
Copy link
Contributor

Thanks for that PR, Chris! I'm not sure if it's a good idea to overwrite core functions of ProseMirror but I will merge that for now.

@Chrissi2812 Chrissi2812 deleted the menu-bubble-position branch May 2, 2019 09:46
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.

Wrong bubble position
3 participants