Closed juniwalk closed 1 year ago
The iconpicker allows you to set your onBeforeOpen conditions, so this is not a problem.
The fact that I have to do in onBeforeOpen
what should be done in open
method by the iconpicker is not a problem?
Indeed I don't know exactly the way you load your page, snippet and ajax data.
Adding $('#uip-modal-'+target).removeClass('uip-close');
somewhere in the plugin CORE code might solve the issue, but I can't reproduce the case easily.
Well there is this code in open
method that I think handles this:
} else {
//Icon library open if dom element exist
this.universalDomEle.classList.remove('uip-close');
this.universalDomEle.classList.add('uip-open');
}
Which means the issue must be there? My javascript knowledge is very limited, I might try to fix it however I don't know if I won't break something else.
Yes, that's the question. I don't want to break anything, so I'd need to be able to reproduce your issue.
If you can provide me a simple test file, without using any framework or external tool then I'll work on it.
I am using your picker with Nette Framework (php) and Naja.js (js) which uses "snippets" as blocks of html to be updated after ajax request.
After update of the snippet with picker in it, it would not reopen, I had to add to add
onBeforeOpen
listener to removeuip-close
class.Edit: This code gets called on load and after snippet update so picker should be reinitialized.