You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Beta] Each time the n or p Hotkey is used, the editor refocuses on Windows #37146
Problem: When tested on Chrome and Firefox (on Windows) and using the p or n hotkeys, we are supposed to be able to navigate to the next and previous lessons without the editor going back into focus while in the escaped mode. However, on the beta site, I have to keep escaping the editor every single time I click the p or n once I first escape the editor. The original navigation buttons that were removed in favor of the hot keys did not do this.
I have been able to reproduce this. What is happening is every time n or p is pressed, the new challenge is opened and then the focus of the cursor moves to the editor which makes further navigation impossible unless someone uses their mouse to refocus somewhere else
@vkWeb I've not been able to reproduce this yet. It works as intended (for me) on Chrome and Firefox on both Windows and Ubuntu, so if anyone could walk me through the steps, that would be a big help.
@rickysyamsi the original intention was that the editor is focused by default, since that creates the cleanest flow. I.e. if the user wants to immediately get started using the editor, they can. Pressing escape should allow them to navigate freely until they re-focus on the editor restoring the previous behaviour.
The idea is to not need to touch your mouse more than its needed.
So when you complete the challenge, your next one is served with the editor already in focus.
The hotkeys for nav are really a nice to have and by no means our primary way of navigating.
To quit the focus on the editor and enter a nav mode, you hit escape and start pressing the hot key p or n.
The editor does not resume focus unless you click on it.
Once it is in focus, the nav is ended and you have to hit esc again to enter nav.
I also just realize that I can not scroll challenge description part with keyboard navigation (up and down keys). Should I create a new issue for this?
As of this comment the issue is that on Windows at least as reported by OP, the editor automatically gets focused (our intended parent behaviour in non-navigation mode). I for one could not reproduce on macOS or Windows myself.
This is an annoying experience, nonetheless only for users using the nav mode, which we have not yet advertised.
So the fix would be to check and handle the use cases as mentioned in my last comment.
Currently when using keyboard navigation, students need to press multiple tabs to access editor. I think that it will be very helpful if students can access editor easily with single keyboard press (for example 'e' key).
@rickysyamsi That's a nice idea! Please could you add that to the up down arrow issue, so we can discuss adding that as a feature.
After chatting with @thecodingaviator I think I've pinned down how to reproduce the issue.
Open any challenge
Click on the instructions
Press escape
Press n
The new challenge will open and the editor will get focused.
Pressing escape only works if the editor is already focused, but clearly that's not how people are using it in practice. I think we should enter navigation mode whenever the Hotkeys have focus.
@rickysyamsi You're welcome to try and fix this, but don't feel obliged - I can take care of it tomorrow.
The idea is that unless you actively escape, you aren't in navigation mode and it should behave normally. So, if you're in the flow "Open challenge, read instructions, start typing, ctrl + enter, ctrl + enter, repeat" you never need to touch the mouse as the editor always takes focus when you enter a challenge.
If you press escape (currently only when in the editor. After #37167 everywhere except the header and the preview) then the editor will not get focused automatically i.e. you're in navigation mode.
The reason for making people press escape is to prevent them accidentally switching to navigation mode just by clicking on, say, the instructions and being annoyed that they have to keep selecting the editor. Not something they have to do at the moment.
Activity
raisedadead commentedon Oct 9, 2019
Thanks. Please share the detailed config for your OS.
RandellDawson commentedon Oct 9, 2019
Windows 10 Home edition. Using Chrome Version 77.0.3865.90 (Official Build) (64-bit) and Firefox 69.0.2 (64-bit).
thecodingaviator commentedon Oct 9, 2019
I have been able to reproduce this. What is happening is every time
norpis pressed, the new challenge is opened and then the focus of the cursor moves to the editor which makes further navigation impossible unless someone uses their mouse to refocus somewhere elseraisedadead commentedon Oct 9, 2019
Thanks, we know this is confirmed. Lets keep the thread for solutions.
vkWeb commentedon Oct 9, 2019
@ojeytonwilliams Any thoughts on this?
ojeytonwilliams commentedon Oct 9, 2019
@vkWeb I've not been able to reproduce this yet. It works as intended (for me) on Chrome and Firefox on both Windows and Ubuntu, so if anyone could walk me through the steps, that would be a big help.
@rickysyamsi the original intention was that the editor is focused by default, since that creates the cleanest flow. I.e. if the user wants to immediately get started using the editor, they can. Pressing escape should allow them to navigate freely until they re-focus on the editor restoring the previous behaviour.
raisedadead commentedon Oct 9, 2019
The idea is to not need to touch your mouse more than its needed.
So when you complete the challenge, your next one is served with the editor already in focus.
The hotkeys for nav are really a nice to have and by no means our primary way of navigating.
To quit the focus on the editor and enter a nav mode, you hit escape and start pressing the hot key
porn.The editor does not resume focus unless you click on it.
Once it is in focus, the nav is ended and you have to hit esc again to enter nav.
Yes please.
raisedadead commentedon Oct 9, 2019
As of this comment the issue is that on Windows at least as reported by OP, the editor automatically gets focused (our intended parent behaviour in non-navigation mode). I for one could not reproduce on macOS or Windows myself.
This is an annoying experience, nonetheless only for users using the nav mode, which we have not yet advertised.
So the fix would be to check and handle the use cases as mentioned in my last comment.
ojeytonwilliams commentedon Oct 9, 2019
@rickysyamsi That's a nice idea! Please could you add that to the up down arrow issue, so we can discuss adding that as a feature.
After chatting with @thecodingaviator I think I've pinned down how to reproduce the issue.
The new challenge will open and the editor will get focused.
Pressing escape only works if the editor is already focused, but clearly that's not how people are using it in practice. I think we should enter navigation mode whenever the Hotkeys have focus.
@rickysyamsi You're welcome to try and fix this, but don't feel obliged - I can take care of it tomorrow.
raisedadead commentedon Oct 9, 2019
I would recommend @ojeytonwilliams to take a dig at this, probably would be way faster for you to resolve.
@rickysyamsi you can go ahead and create a pull request for the arrow nav.
Thanks you all.
RandellDawson commentedon Oct 9, 2019
@ojeytonwilliams My steps to reproduce the problem are similar to yours, but I don't have to do your step 3. I simply:
norp.thecodingaviator commentedon Oct 10, 2019
@RandellDawson both ways work since both are doing the exact same job i.e. taking the focus off the editor
ojeytonwilliams commentedon Oct 10, 2019
The idea is that unless you actively escape, you aren't in navigation mode and it should behave normally. So, if you're in the flow "Open challenge, read instructions, start typing, ctrl + enter, ctrl + enter, repeat" you never need to touch the mouse as the editor always takes focus when you enter a challenge.
If you press escape (currently only when in the editor. After #37167 everywhere except the header and the preview) then the editor will not get focused automatically i.e. you're in navigation mode.
The reason for making people press escape is to prevent them accidentally switching to navigation mode just by clicking on, say, the instructions and being annoyed that they have to keep selecting the editor. Not something they have to do at the moment.