Skip to content
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

Widget modality gets confused by cloned masks #1175

Closed

Conversation

jinty
Copy link
Contributor

@jinty jinty commented Sep 10, 2013

Stop widget-modality being confused by multiple masks
If a modal widget and it's mask were cloned by other
code (i.e. a drag/drop proxy) the document could have
multiple masks. This confuses modality, as it uses the
first mask and could reposition it after the second.
Things go downhill from there…

The chosen fix is to keep a reference to the mask
rather than search for it each time. An alternative
would be to search the entire document and delete
extra masks, but I thought that too ugly.

Brian Sutherland added 2 commits September 10, 2013 11:45
If a modal widget and it's mask were cloned by other
code (i.e. a drag/drop proxy) the document could have
multiple masks. This confuses modality, as it uses the
first mask and could reposition it after the second.
Things go downhill from there…

The chosen fix is to keep a reference to the mask
rather than search for it each time. An alternative
would be to search the entire document and delete
extra masks, but I thought that too ugly.

this.widget.hide();
orig_mask = Y.one('.yui3-widget-mask');
Assert.areSame(orig_mask, this.widget.get('maskNode');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinty,

You seem to have forgotten a parentheses at the end of this line, which results in a parse error.

This line should be corrected to:

Assert.areSame(orig_mask, this.widget.get('maskNode'));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Thu, Sep 26, 2013 at 02:51:47PM -0700, Ezequiel Rodriguez wrote:

  •    Assert.areSame(orig_mask, this.widget.get('maskNode');
    

@jinty,

You seem to have forgotten a parentheses at the end of this line, which results in a parse error.

This line should be corrected to:

Assert.areSame(orig_mask, this.widget.get('maskNode'));

Many thanks!

I've just corrected that. I did try interpret the travis CI failure, but
gave up when it just said "SyntaxError: Parse error" without further
context.

Brian Sutherland

@triptych
Copy link
Contributor

ccing @derek to take a look.

@ezequiel
Copy link
Contributor

Thanks.

Merged into dev-master.

@ezequiel ezequiel closed this Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants