• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core, jquery3-api-plugin
    • None
    • * core version 2.481 (latest weekly)
      * jquery3-api 3.7.1-2 (latest)
      * chrome 130.0.6723.59 (also visible on firefox)

      Uncaught TypeError: Cannot read properties of undefined (reading 'submit') at Object.form (index.js:256:44) at showForm (dialog.js:6:12) at HTMLButtonElement.onclick (reproducer/:12:90)

       

      • Verify the code works without the jquery3 adjunct by commenting 
        <st:adjunct includes="io.jenkins.plugins.jquery3"/>

        in `src/main/resources/io/jenkins/plugins/ReproducingAction/index.jelly` and reloading the page.
         

          [JENKINS-73988] Dialogs not working along with jquery3

          Markus Winter added a comment -

          I think the problem is the location where the jquery adjunct is loaded. In your sample you put it before the "<l:layout". If you put it inside of it then everything works fine.

          When you put the jquery before the l:layout then the "<head>" element has no attributes. Those attributes are required for the dialogs and probably also other functionality needs to make use of it

          So probably not really a bug but improper placing of adjuncts

           

          Markus Winter added a comment - I think the problem is the location where the jquery adjunct is loaded. In your sample you put it before the "<l:layout". If you put it inside of it then everything works fine. When you put the jquery before the l:layout then the "<head>" element has no attributes. Those attributes are required for the dialogs and probably also other functionality needs to make use of it So probably not really a bug but improper placing of adjuncts  

          Pierre Beitz added a comment -

          I confirm moving the adjunct loading location works! Thanks a lot!

          Pierre Beitz added a comment - I confirm moving the adjunct loading location works! Thanks a lot!

            mawinter69 Markus Winter
            pierrebtz Pierre Beitz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: