Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Check for this.visible to prevent multiple execution of hide, close and destroy #101

Closed
wants to merge 1 commit into from

2 participants

@RiZKiT

This may happens if events that hide the modal are executed more then once (e.g. because of propagation).

@anutron anutron closed this
@anutron
Owner

pulled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 4, 2012
  1. Check for this.visible to prevent accidently mutliple execution of hi…

    Aicke Schulz authored
    …de (close, destroy)
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 4 deletions.
  1. +6 −4 Source/UI/StickyWin.js
View
10 Source/UI/StickyWin.js
@@ -127,10 +127,12 @@ var StickyWin = new Class({
this.win.show();
},
hide: function(suppressEvent){
- if (typeOf(suppressEvent) == "event" || !suppressEvent) this.fireEvent('close');
- this.hideWin();
- if (this.options.useIframeShim) this.hideIframeShim();
- this.visible = false;
+ if (this.visible) {
+ if (typeOf(suppressEvent) == "event" || !suppressEvent) this.fireEvent('close');
+ this.hideWin();
+ if (this.options.useIframeShim) this.hideIframeShim();
+ this.visible = false;
+ }
return this;
},
hideWin: function(){
Something went wrong with that request. Please try again.