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

[Modal] Action should be fired only for instance where it was clicked by user #5559

Closed
nikolaybobrovskiy opened this issue Jul 18, 2017 · 2 comments
Milestone

Comments

@nikolaybobrovskiy
Copy link

Problem is actual for allowMultiple: true config. Fiddle: https://jsfiddle.net/donnicky/5vpn7wyk/
In the shown form (Person) click Cancel, then click Yes in confirmation dialog and you'll see that onApprove is called for both dialogs, but it is expected to be called for confirmation dialog only. Generally it the same with any action - it is fired for all active dialogs.

@awgv awgv added this to the Needs Milestone milestone Jul 18, 2017
@nikolaybobrovskiy
Copy link
Author

BTW, now there is a workaround using selector modal config if set specific selector per dialog.

@jlukic jlukic modified the milestones: 2.2.12, Needs Milestone Jul 20, 2017
@jlukic
Copy link
Member

jlukic commented Aug 7, 2017

Hi, your code should look like this JSFiddle
https://jsfiddle.net/gk7j7a72/

There is a related issue though that you probably ran into where with multiple modals the top modal has to be one of the following:

  1. Be initialized last
  2. Be included last inside the modals dimmer
  3. Manually have a higher z-index set in css

I've made a fix which will automatically make additional modals appear on top in next release.

jlukic added a commit that referenced this issue Aug 7, 2017
@jlukic jlukic closed this as completed Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants