-
Notifications
You must be signed in to change notification settings - Fork 2k
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
file-editor:cancel
event is incorrectly implemented
#4045
Comments
The event still doesn't fire for me when clicking the Cancel button in the image editor. Is this still pending? |
The issue is open, that means yes |
Any idea on a workaround while it's getting figured out? All I need is for the Cancel button in the File Editor to skip the files list (which is hidden via CSS for now if the prop |
@arturi do you have time to look at this? |
@altechzilla So you'd like the |
Basically, yes. When cancelled, I need the editor to reset back to “drag an image or click to select” view. Which means removing the file so that there’s none. Would’ve been easy with that event working properly |
Is it still broken? As I cannot get |
It looks like still doesn't work. |
+1 Still doesn't work in the latest 3.10.0 release. |
+1 Would like this |
Don't know if this is a bit of an overkill but, here is a way to do what @altechzilla asked for.
|
+1 here @uppy/core 3.4.0 and @uppy/image-editor 2.1.3 |
Hi all, this has been hopefully fixed in the latest release, please update @uppy/dashboard to the latest and try the event again. Sorry for the delay. |
Initial checklist
Link to runnable example
No response
Steps to reproduce
@uppy/dashboard
with@uppy-image-editor
.on('file-editor:cancel', () => console.log('foo'))
Expected behavior
file-editor:cancel
should have fired.Actual behavior
Nothing happens.
In #3875 the
file-editor:cancel
event was added. However, it fires when you cancel the meta data editing screen instead of the cancel inside the image editor. This is incorrect.The correct solution isn't easy unfortunately. Cancel is called here:
uppy/packages/@uppy/dashboard/src/components/EditorPanel.jsx
Lines 20 to 26 in c658883
hideAllPanels
has no knowledge plugins so we can't fire it there, then every "Cancel" would have that event, instead of just the cancel for the image editor. Currently, this event only fires when the plugin is uninstalled during editing. But this is a strange edge case and I would say the value offile-editor:cancel
would mostly come from the cancel button.The text was updated successfully, but these errors were encountered: