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

f:combobox may break form.onsubmit

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.532.1
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: