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

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.

jinty added 2 commits 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.

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

This comment has been minimized.

Copy link
@ezequiel

ezequiel Sep 26, 2013

Contributor

@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'));

This comment has been minimized.

Copy link
@jinty

jinty Sep 27, 2013

Author Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2013

ccing @derek to take a look.

@ezequiel

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2014

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
Projects
None yet
3 participants
You can’t perform that action at this time.