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

Prevent id conflict #6

Open
zack9433 opened this issue May 11, 2017 · 3 comments
Open

Prevent id conflict #6

zack9433 opened this issue May 11, 2017 · 3 comments

Comments

@zack9433
Copy link
Contributor

Open wrong overlay because there is a duplicated id in the page.

@allenhwkim
Copy link
Contributor

Please be more specific, I have no idea on this issue.

@zack9433
Copy link
Contributor Author

<h3>Open Inside Overlay For A DIV</h3>
<div id="my-div" style="width: 400px; height: 100px; border: 1px solid #ccc; position: relative">
  <button (click)="overlayManager.open('div-loading')">Show Loading For This Div</button>
  <div id="div-loading" ngui-overlay>
    <div style="color:#fff">Loading</div>
    <button (click)="overlayManager.close('div-loading')">Close</button>
  </div>
  My Div<br/>
</div>

<h3>Open Inside Overlay For A DIV</h3>
<div id="my-div" style="width: 400px; height: 100px; border: 1px solid #ccc; position: relative">
  <button (click)="overlayManager.open('div-loading')">Show Loading For This Div</button>
  <div id="div-loading" ngui-overlay>
    <div style="color:#fff">Loading</div>
    <button (click)="overlayManager.close('div-loading')">Close</button>
  </div>
  My Div<br/>
</div>

screen recording 2017-05-12 at 09 10

@allenhwkim
Copy link
Contributor

Can you create a plunker for this?

I think you should use different id for different popup like the following. If you provide a plunker, I can quickly verify my assumption.

<h3>Open Inside Overlay For A DIV</h3>
<div id="my-div-1" style="width: 400px; height: 100px; border: 1px solid #ccc; position: relative">
  <button (click)="overlayManager.open('div-loading')">Show Loading For This Div</button>
  <div id="div-loading" ngui-overlay>
    <div style="color:#fff">Loading</div>
    <button (click)="overlayManager.close('div-loading')">Close</button>
  </div>
  My Div 1<br/>
</div>

<h3>Open Inside Overlay For A DIV</h3>
<div id="my-div-2" style="width: 400px; height: 100px; border: 1px solid #ccc; position: relative">
  <button (click)="overlayManager.open('div-loading-2')">Show Loading For This Div</button>
  <div id="div-loading-2" ngui-overlay>
    <div style="color:#fff">Loading</div>
    <button (click)="overlayManager.close('div-loading')">Close</button>
  </div>
  My Div 2<br/>
</div>

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

No branches or pull requests

2 participants