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

f:combobox may break form.onsubmit



    • Improvement
    • Status: Resolved (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 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.



          ikedam ikedam created issue -
          rtyler R. Tyler Croy made changes -
          Field Original Value New Value
          Workflow JNJira [ 153611 ] JNJira + In-Review [ 178551 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          oleg_nenashev Oleg Nenashev made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]


            ikedam ikedam
            ikedam ikedam
            0 Vote for this issue
            3 Start watching this issue