In my plugin I need to attach an handler JS function (defined in my 'edit' vm template) based on the customfield id, written between "script" tags, as in the example below :
This handler function is well attached on the customfield#1 when opening the creation popup directly on the JIRA project on which customfield#1 is contextualized, but never if I switch on an other project on which customfield#2 (same type) is contextualized.
It seems that, when switching between projects, you are injecting refreshed HTML for fields using the jQuery method .html( htmlString ) which is, according to the comment of Neil M in this jQuery documentation page, stripping all script tags :
Also, if you are trying to add html that contains SCRIPT elements, these elements will be stripped from the resulting html. Not sure if this is the browser's rendering or if it's jQuery, but either way, I see it as being a protective layer against script injection.
==> my customfield type is unusable
Have you got any workaround or advice for me ? Could you try to do something about that please ?
Thank you in advance for your time,