-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: right click select images #5056
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Thank you, Ben! @zurfyx , @fantactuka , @acywatson , you happy with this one, before I merge this one?
I would try avoiding adding new commands into core that are not used by core itself or plain/rich text plugins. We recently spotted few commands (e.g., CLEAR_HISTORY_COMMAND) that take bundle size, but not necessarily used (which is even more likely with context menu command). |
I'm happy to move the context menu command away from the core into the images plugin, however, I'd argue it belongs in the core. There's many situations where it may be useful for a node (not just an images node) to execute some logic in response to a right click. Leaving it in the core maintains this flexibility, at the expense of a few bytes. |
I agree with Ben, the core already has the dragover, dragend, etc. events included, in my opinion it makes sense contextmenu to be alongside them, the tradeoff is worth it. |
I'm not clear on why we can't do this in userland by just listening for this event. Maybe we should think about removing more of these commands from the core. Listening directly to DOM events is not a bad pattern, imo. |
Ok, we'll move it to outside of core... |
moved away from the core, apologies for the delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Ben! @fantactuka , @zurfyx happy with this one?
The current behavior
The new expected behavior