• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • None
    • Jenkins 1.532.1

      f:combobox prevents form submission when the dropdown is open.
      This is done by interrupting form.onsubmit.
      It handles form.onsubmit in the following way:

      1. ComboBox saves the original onsubmit handler in its initialization.
      2. When the combobox is selected, it shows the dropdown and overwrites the onsubmit handler. The ovirridden onsubmit prevents form submission of the dropdown is open.
      3. When the dropdown is closed, recovers the saved form.onsubmit.

      The step 1 is called from Behavior module with priority 100.
      If the form.onsubmit was overridden between step 1 and 2 (that is, if there is a behavior overriding form.onsubmit with priority > 100), it would be overridden in step 3 and lost.

      I see this problem happen in Jenkins 1.480, which has not introduced priorities in Behavior module, and it fails to build json to submit.
      Though it no longer happens in the latest Jenkins as they introduced priorities in Behavior module, I want to fix this behavior as this can be harmful in some situations.

          [JENKINS-21613] f:combobox may break form.onsubmit

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/jenkins/pull/1111

          Code changed in jenkins
          User: ikedam
          Path:
          war/src/main/webapp/scripts/combobox.js
          http://jenkins-ci.org/commit/jenkins/d0ff4135e9fbe86faf2caeb28c9e180b406eb6d1
          Log:
          [FIXED JENKINS-21613] combobox now recovers form.onsubmit to the one just before override.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: war/src/main/webapp/scripts/combobox.js http://jenkins-ci.org/commit/jenkins/d0ff4135e9fbe86faf2caeb28c9e180b406eb6d1 Log: [FIXED JENKINS-21613] combobox now recovers form.onsubmit to the one just before override.

          Oleg Nenashev added a comment -

          The fix has been integrated towards 2.114

          Oleg Nenashev added a comment - The fix has been integrated towards 2.114

            ikedam ikedam
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: