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

Keep image selection when editing #2049

Merged
merged 3 commits into from
Sep 5, 2023
Merged

Conversation

juliaroldi
Copy link
Contributor

When select a image that is editing mode, it will change the editor selection to the shadow root. Therefore, when mouse up, check if the image is editing mode, then reselect it.

@JiuqingSong
Copy link
Collaborator

Question, without this change, is there anything borken?

@juliaroldi
Copy link
Contributor Author

Question, without this change, is there anything borken?

The getSelectionRangeEx are not returning the image selection when we click over a image that is in editing mode (image editing wrapper on), because it selects the span that has the shadow dom element and not the image.

@JiuqingSong
Copy link
Collaborator

Question, without this change, is there anything borken?

The getSelectionRangeEx are not returning the image selection when we click over a image that is in editing mode (image editing wrapper on), because it selects the span that has the shadow dom element and not the image.

I see.

@juliaroldi juliaroldi merged commit 764481a into master Sep 5, 2023
@JiuqingSong JiuqingSong deleted the u/juliaroldi/getImage-fix branch September 8, 2023 22:34
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.

2 participants