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

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Won't Do
    • Component/s: None
    • Environment:
      JIRA javascript

      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;
      }
      

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

              Created:
              Updated:
              Resolved: