Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64252

hasClassName is not a function

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Steps to reproduce:

      1. Install 2.267 and go through the wizard installing no plugins
      2. Create a new freestyle job
      3. Add a "Execute Windows batch command" build step
      4. Click Advanced
      5. Click Add environment filter
      6. Select "Only keep"

      Expected Result:

      It works

      Actual Result:

      See screenshot. Console says:

      Uncaught TypeError: h.hasClassName is not a function
          prepareDD http://localhost:8080/adjuncts/813d7f4b/lib/form/dragdrop/dragdrop.js:16
          <anonymous> http://localhost:8080/adjuncts/813d7f4b/lib/form/hetero-list/hetero-list.js:104
          renderOnDemand http://localhost:8080/static/813d7f4b/scripts/hudson-behavior.js:684
          next http://localhost:8080/static/813d7f4b/scripts/hudson-behavior.js:723
          sequencer http://localhost:8080/static/813d7f4b/scripts/hudson-behavior.js:726
          evalInnerHtmlScripts http://localhost:8080/static/813d7f4b/scripts/hudson-behavior.js:711
          renderOnDemand http://localhost:8080/static/813d7f4b/scripts/hudson-behavior.js:682
          onSuccess http://localhost:8080/adjuncts/813d7f4b/org/kohsuke/stapler/bind.js:57
          respondToReadyState http://localhost:8080/static/813d7f4b/scripts/prototype.js:1657
          onStateChange http://localhost:8080/static/813d7f4b/scripts/prototype.js:1600
          bind http://localhost:8080/static/813d7f4b/scripts/prototype.js:414
      

        Attachments

          Issue Links

            Activity

            Hide
            fqueiruga Félix Queiruga Balado added a comment -

            Daniel Beck did you try to replicate on < 264?

            Show
            fqueiruga Félix Queiruga Balado added a comment - Daniel Beck  did you try to replicate on < 264?
            Hide
            danielbeck Daniel Beck added a comment -

            This works as expected in 2.263.

            Show
            danielbeck Daniel Beck added a comment - This works as expected in 2.263.
            Hide
            danielbeck Daniel Beck added a comment -

            This breaks as described above in 2.264.

            Show
            danielbeck Daniel Beck added a comment - This breaks as described above in 2.264.
            Hide
            fqueiruga Félix Queiruga Balado added a comment - - edited

            My research shows that when trying to initialise this dropdown as a drag-drop element, the DOM transversal used by prototypejs throws an exception when encountering an svg tag corresponding with the help icon. The following change to the dragdrop.js __ file seems to work:

             

            function prepareDD(e) {
                var h = e.querySelector('.dd-handle');
                if (h !== undefined) {
                    var dd = new DragDrop(e);
                    dd.setHandleElId(h);
                }
            }
            
            Show
            fqueiruga Félix Queiruga Balado added a comment - - edited My research shows that when trying to initialise this dropdown as a drag-drop element, the DOM transversal used by prototypejs throws an exception when encountering an  svg tag corresponding with the help icon. The following change to the  dragdrop.js  __ file seems to work:   function prepareDD(e) { var h = e.querySelector( '.dd-handle' ); if (h !== undefined) { var dd = new DragDrop(e); dd.setHandleElId(h); } }
            Hide
            fqueiruga Félix Queiruga Balado added a comment -

            Can we closed this? I think it has been released as of 2.268.

            Show
            fqueiruga Félix Queiruga Balado added a comment - Can we closed this? I think it has been released as of 2.268.
            Hide
            timja Tim Jacomb added a comment -

            Yes, feel free to resolve yourself better it gets updated than left forever

            Show
            timja Tim Jacomb added a comment - Yes, feel free to resolve yourself better it gets updated than left forever

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: