hitting back after making an edit should keep edit mode open

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
steps:
- make an invalid edit (eg. try to set the assignee to blank)
- hit save
- read the error message
- hit back

expected:
- bug in edit mode so corrections can be made

actual:
- view mode
(Assignee)

Comment 1

4 years ago
Created attachment 8603198 [details] [diff] [review]
1162854_1.patch
Attachment #8603198 - Flags: review?(dkl)
Comment on attachment 8603198 [details] [diff] [review]
1162854_1.patch

Review of attachment 8603198 [details] [diff] [review]:
-----------------------------------------------------------------

<@dkl> glob: strange. bug 1162854. if i open user story modal, but not focus it, and also open people modal, hit edit, clear assignee, commit. When I hit back it always autofocuses the user story text area
<@glob> dkl, ah, i know what that is.  comment in the review i'll work around it

My guess is maybe to do with below but didn't play around with it:

            // if there's no current user-story, it's a better experience if it's editable by default
            if ($('#cf_user_story').val() === '') {
                $('#user-story-edit-btn').click();
            } 

Otherwise looks good will r+ once the fix is verified.

dkl
Attachment #8603198 - Flags: review?(dkl) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 8606854 [details] [diff] [review]
1162854_2.patch

- prevent user-story from stealing focus when navigating back
Attachment #8603198 - Attachment is obsolete: true
Attachment #8606854 - Flags: review?(dkl)
Comment on attachment 8606854 [details] [diff] [review]
1162854_2.patch

Review of attachment 8606854 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl
Attachment #8606854 - Flags: review?(dkl) → review+
(Assignee)

Comment 5

4 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   7810a12..ad9f924  master -> master
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.