Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

fixed issue with modal stealing focus even after it is destroyed #444

Merged
merged 1 commit into from Dec 14, 2012
Merged

fixed issue with modal stealing focus even after it is destroyed #444

merged 1 commit into from Dec 14, 2012

Conversation

maciejk
Copy link

@maciejk maciejk commented Dec 13, 2012

When modal qtip is destroyed (for example when it's trigger element is removed from DOM), it doesn't stop stealing focus. I think that the reason is that the event handler is bound using bind, and destroy tries to unbind it using undelegate.

Simple reproduction:
http://jsbin.com/ixodon/1/edit

  1. Click a button
  2. Wait for modal to disappear
  3. Now it is impossible to focus the input and type anything

And with this fix applied:
http://jsbin.com/urorof/1/edit

Craga89 added a commit that referenced this pull request Dec 14, 2012
fixed issue with modal stealing focus even after it is destroyed
@Craga89 Craga89 merged commit c0d1447 into qTip2:master Dec 14, 2012
Craga89 added a commit that referenced this pull request Dec 14, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants