Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-25167

A form with an error should be considered to be dirty and prompt if the user leaves the page.

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • None
    • JIRA javascript
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      If a form with a textarea has been submitted but is returned with errors, the form should be considered dirty (i.e. not saved).
      This will prevent people losing forms with large amounts of unsaved text if the accidentally navigate away or close the page.

      Integration tests will need to be considered when making this change as if the dirty form warning appears it needs to be handled in a specific way. See: http://code.google.com/p/selenium/issues/detail?id=27

      Code required for isDirty::isElementDirty

      if ($form.has(".error, .errMsg, .errorMessage, .errLabel, .ajaxerror").length > 0 || $form.prev(".error").length > 0) {
          // Treat the form as dirty if it contains errors -- the form data is unlikely to be saved.
          return true;
      }
      

              Unassigned Unassigned
              delkan David Elkan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: