-
Notifications
You must be signed in to change notification settings - Fork 533
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
Temporary "drag" items don't get destroyed if not dropped #133
Comments
Looks like the item is created in DragSource here when the drag begins, but if all the |
the fix appears to be to add:
But I'll have to test some more |
That doesn't always work: I have a screen capture (attached) |
With reference to my comment above: I realise that the capture is using an unpatched GoldenLayout and so is a separate issue, unrelated to this. |
I have a simple setup where I log when things are opened and closed. If I use an
on("open")
to register for events and match it with eitheron("close")
oron("destroy")
then for the temporary "drag" items I see an open, but no close or destroy.I'm not seeing any close events (c.f. #106 ), but not even a destroy means I have zombie components hanging around causing trouble.
For example, if one edits the drag example codepen to put simple logging ( see https://codepen.io/mattgodbolt/pen/qadVZp ) :
Open the codepen and then the JS console. Notice the opens for the existing panels are there. If you drag a new "You've added me!" over, you see the open, and if you drop it on the layout so it "sticks" you can close it and see a "close" event for it.
However, if you click and hold the "You've added me" text but then drop it right there (ie cancel the drag), you'll see no destroy or close event is emitted.
The text was updated successfully, but these errors were encountered: