Focus IssueId when linking issues
When I click on the add link in the linked issues section of an issue, the kind Combo and the IssueNumber edit are displayed. Before (can't remember if 5.0.0 or 4.X), the Edit received focus, so that I could just type in issue number directly after clicking Add. Now, I must manually clic in the Edit before typing.
(the captions may be wrong as I am in french translation)
- Status changed from New to Confirmed
- Affected version changed from 5.0.2 to 4.2.7
Alexandre Guilleme wrote:
Before (can't remember if 5.0.0 or 4.X), the Edit received focus, so that I could just type in issue number directly after clicking Add. Now, I must manually clic in the Edit before typing.
I have confirmed the issue. Redmine 4.1.7 works as described but Redmine 4.2.7 and 5.0.2 don't.
#2 Updated by Mizuki ISHIKAWA 22 days ago
- You cannot programmatically focus an element after you have attempted to focus it while it was hidden (display:none) https://github.com/jquery/jquery/issues/4950
- You cannot programmatically focus an element after removing its focus handler https://github.com/jquery/jquery/issues/4867
- => The milestone for this issue is 3.6.1, so it will likely be resolved after 3.6.1 is released!
Even with jQuery 3.6.0, the problem does not seem to occur if the code is changed to focus only when the focus target is :visible, as in the following diff.