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 Image range selection #2768

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Fix Image range selection #2768

merged 5 commits into from
Aug 19, 2024

Conversation

juliaroldi
Copy link
Contributor

@juliaroldi juliaroldi commented Aug 16, 2024

Fix 1: when select image for copy/cut, the image range selection must appear.
Fix 2: on firefox delete the image using delete/backspace to remove the image.

SelectImageWithCopyCut

Warning: this fix for image range selection does not work on Safari, selecting image range on safari is breaking the cut behavior.

@juliaroldi juliaroldi changed the title image-selection Fix Image range selection Aug 16, 2024
@juliaroldi juliaroldi marked this pull request as ready for review August 16, 2024 17:31
@JiuqingSong
Copy link
Collaborator

About the Safari warning, does it regress anything, or just not a complete fix?

@juliaroldi
Copy link
Contributor Author

About the Safari warning, does it regress anything, or just not a complete fix?

The fix will not work for Safari, if the image is selected with range when cut/copy, the cut will not work, so for Safari, we do not change anything, just leave the behavior we have now.

if (
(isModifierKey(rawEvent) || rawEvent.shiftKey) &&
selection.image &&
!this.isSafari
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JiuqingSong Safari will ignore range selection

@juliaroldi juliaroldi merged commit 13ba45a into master Aug 19, 2024
7 checks passed
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