• Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Chrome (but other browsers should behave the same ... I think)

      In hudson-behavior.js <form> elements behavior is not extensible.

      • form.onsubmit handler doesn't take into account the fact the form could have a "onsubmit" attribute (it always overrides it with the call of buildFormTree())
      • Element.hasClassName() call will never return true since "form" variable is not passed to that call !

      For my global-build-stats plugin, I need to create "home made" form with a onsubmit handler.
      Hudson behaviour systematically overrides my onsubmit attribute with its behaviour.
      => I'd like hudson behavior to "add" (and not "override") its behavior to the existing form behavior

      I submitted a patch to the hudson-behavior 28557 revision.

          [JENKINS-5927] Form Hudson-behaviour not extensible

          Alan Harder added a comment -

          Thanks! Will be included in Hudson 1.357

          Alan Harder added a comment - Thanks! Will be included in Hudson 1.357

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/war/resources/scripts/hudson-behavior.js
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/30456
          Log:
          [FIXED JENKINS-5927] apply patch from fcamblor to allow forms with an existing
          onsubmit handler; Hudson will now extend that rather than replace it.
          Patch also fixes handling of "no-json" class on a form.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/war/resources/scripts/hudson-behavior.js trunk/www/changelog.html http://jenkins-ci.org/commit/30456 Log: [FIXED JENKINS-5927] apply patch from fcamblor to allow forms with an existing onsubmit handler; Hudson will now extend that rather than replace it. Patch also fixes handling of "no-json" class on a form.

            mindless Alan Harder
            fcamblor Frédéric Camblor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: