-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
fix bug with deleting from asset manager #560
Conversation
@@ -79,7 +79,7 @@ module.exports = require('./AssetView').extend({ | |||
* @private | |||
* */ | |||
onRemove(e) { | |||
e.stopPropagation(); | |||
e.stopImmediatePropagation(); |
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.
I thought that e.stopPropagation() would work, but found this after a quick google search: https://stackoverflow.com/questions/5457915/how-can-i-stop-event-propagation-with-backbone-js
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.
Great, this is actually working 👍
@@ -1,9 +1,9 @@ | |||
module.exports = require('./AssetView').extend({ | |||
|
|||
events: { | |||
'click [data-toggle=asset-remove]': 'onRemove', |
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.
I couldn't find it documented anywhere, but these events seem to fire in the order they are registered. The onRemove function needs to run before onClick so that the event propagation can be stopped.
This is the fix #549 |
hey Ryan ping me on discord chat pls |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.