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

Don't ask for confirmation when it doesn't make any sense

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Introduced in this commit:

      https://github.com/jenkinsci/jenkins/pull/962/files#r9552059

      A few of the odd behaviors:

      • Asks for confirmation when browsing away after navigating between form elements by pressing tab
      • Asks for confirmation when triggering form submit using keyboard
      • Asks for confirmation when navigating away after clicking an Advanced… button.

        Attachments

          Issue Links

            Activity

            Hide
            amuniz Antonio Muñiz added a comment -

            Yes, it's fixed. I thought it was automatically closed by the bot.

            Show
            amuniz Antonio Muñiz added a comment - Yes, it's fixed. I thought it was automatically closed by the bot.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Antonio Muñiz
            Path:
            core/src/main/resources/lib/form/confirm.js
            core/src/main/resources/lib/form/select/select.js
            http://jenkins-ci.org/commit/jenkins/acd341d5db724bc49fdbc52220f9e938813f5663
            Log:
            JENKINS-21720 JS alert preventig to leave a configuration page even without formulary changes

            (cherry picked from commit f63407a87e9dc1c1f79c9a7d885cdd58a55ed657)

            Compare: https://github.com/jenkinsci/jenkins/compare/012071befcc2...acd341d5db72

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Muñiz Path: core/src/main/resources/lib/form/confirm.js core/src/main/resources/lib/form/select/select.js http://jenkins-ci.org/commit/jenkins/acd341d5db724bc49fdbc52220f9e938813f5663 Log: JENKINS-21720 JS alert preventig to leave a configuration page even without formulary changes (cherry picked from commit f63407a87e9dc1c1f79c9a7d885cdd58a55ed657) Compare: https://github.com/jenkinsci/jenkins/compare/012071befcc2...acd341d5db72
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4358
            JENKINS-21720 JS alert preventig to leave a configuration page even without formulary changes (Revision acd341d5db724bc49fdbc52220f9e938813f5663)

            Result = UNSTABLE
            ogondza : acd341d5db724bc49fdbc52220f9e938813f5663
            Files :

            • core/src/main/resources/lib/form/select/select.js
            • core/src/main/resources/lib/form/confirm.js
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4358 JENKINS-21720 JS alert preventig to leave a configuration page even without formulary changes (Revision acd341d5db724bc49fdbc52220f9e938813f5663) Result = UNSTABLE ogondza : acd341d5db724bc49fdbc52220f9e938813f5663 Files : core/src/main/resources/lib/form/select/select.js core/src/main/resources/lib/form/confirm.js
            Hide
            andreituicu Andrei Tuicu added a comment -

            Hello, Antonio Muñiz,

            This is just my opinion, but I think that it would be better to allow change events when a select is filled for the first time. For example, if you have a select on which other selects depend; in this case, when the main select is filled, I want my doFill${Field} methods to be called for the dependencies so they are filled based on the value of said main select. In the end, there is an actual change, because that particular select changes from nothing to the first value.

            What do you think? In my opinion we shouldn't have this check here:
            https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/form/select/select.js#L51

            I'm asking, because it is causing bugs in a plugin that I'm developing. I was relying on that change event.

            Thank you,
            Andrei

            Show
            andreituicu Andrei Tuicu added a comment - Hello, Antonio Muñiz , This is just my opinion, but I think that it would be better to allow change events when a select is filled for the first time. For example, if you have a select on which other selects depend; in this case, when the main select is filled, I want my doFill${Field} methods to be called for the dependencies so they are filled based on the value of said main select. In the end, there is an actual change, because that particular select changes from nothing to the first value. What do you think? In my opinion we shouldn't have this check here: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/form/select/select.js#L51 I'm asking, because it is causing bugs in a plugin that I'm developing. I was relying on that change event. Thank you, Andrei
            Hide
            amuniz Antonio Muñiz added a comment -

            Andrei Tuicu The JS alert should be shown only when there was some change made by the user, otherwise we get confirmation alerts when there were no change!

            No user interaction must imply no navigation confirmation.

            Show
            amuniz Antonio Muñiz added a comment - Andrei Tuicu The JS alert should be shown only when there was some change made by the user, otherwise we get confirmation alerts when there were no change! No user interaction must imply no navigation confirmation.

              People

              • Assignee:
                amuniz Antonio Muñiz
                Reporter:
                danielbeck Daniel Beck
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: