How to make checkboxLayer locked to screen, so it won't close when lose focus
I attached on-select-all callback which opens modal popup with overlay. It's z-index is higher than 999, because checkboxLayer has z-index: 999, and modal must be first at the stack order. But when I click on modal container, i.e. text of modal, the checkboxLayer losts its focus and closes. Any ideas, how could I prevent this behaviour?
@aryniec ,
You'll need to modify the code, specifically on the function "externalClickListener".
IMO, the flow roughly would be like this:
- Most likely you need to pass an extra parameter into the directive, say the modal ID or modal class name.
- In that externalClickListener function, do a checking: if the click happens on that modal (by modal ID or by class name from step 1 above), then don't close the directive.
@isteven,
Isn't that function "externalClickListener" already prepared for it: https://github.com/isteven/angular-multi-select/blob/master/isteven-multi-select.js#L689
there's argument 'e' which is used in loop, and checks if any element from looped dom elements is same as this we clicked on. Shouldn't this do the job?