Issue id input should get focus after adding related issue
|Assignee:||Go MAEDA||% Done:|
Current behavior when adding multiple related issues:
Issue #text input has focus
- Enter issue number, press
- The add related issue subform stays open, but the
Issue #input has lost focus
To add another related issue, you must either:
- Tab 5 times (to cycle through the
Addlink, the link to the related issue, the
Delete relationlink, the relation type drop-down, and then the
Issue #input). Then to add a third issue, you must tab 7 times. For a fourth, 9 times, and so on.
- Move the mouse and re-click the text input.
Addto close the subform and then
Addto reopen it, whereupon the
Issue #input receives focus.
The UI anticipates that you may need to enter multiple related issues as the subform stays open after each addition. Thus after a related issue is added the
Issue # input should retain focus.
Fix: Issue id input should get focus after adding related issue (#22023).
Patch by Mizuki ISHIKAWA.
#2 Updated by Mizuki ISHIKAWA about 3 years ago
This feature can be realized by the following small change.
#3 Updated by Go MAEDA about 3 years ago
- Target version set to 3.3.8
The patch posted by Mizuki works fine. Setting target version to 3.3.8.
The current code of Redmine sets focus to the text box in source:tags/3.4.5/app/views/issue_relations/create.js.erb#L5 but the focus will be cleared by
$('#new-relation-form').show(); in source:tags/3.4.5/app/views/issue_relations/create.js.erb#L7.
The original code tries to set the focus only when no error occurs, but the proposed patch also sets the focus when an error occurs. I think the behavior of the patch is more natural.
#4 Updated by Go MAEDA about 3 years ago
- Tracker changed from Feature to Defect
- Subject changed from Have the Issue # input retain focus after adding related issue to Issue ID input should get focus after adding related issue
- Affected version set to 2.4.0
This bug seems to be introduced in r11610 (Redmine 2.4.0).
#5 Updated by Go MAEDA about 3 years ago
- Subject changed from Issue ID input should get focus after adding related issue to Issue id input should get focus after adding related issue
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed to the trunk and stable branches. Thank you all for reporting and fixing this issue.