Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Page navigates back and forward when using command + left within an input field #723

Closed
bbondy opened this issue Feb 11, 2016 · 12 comments
Closed
Assignees
Labels
needs-info Another team member needs information from the PR/issue opener.
Milestone

Comments

@bbondy
Copy link
Member

bbondy commented Feb 11, 2016

No description provided.

@hsribei
Copy link

hsribei commented Feb 11, 2016

Surprisingly, it seems not to navigate back/forward when I'm not within an input field. And on the urlBar it neither navigates nor moves the cursor. Edit: sometimes it does navigate when on the urlBar and outside input fields. Haven't found a pattern yet.

@diracdeltas
Copy link
Member

basically it checks for whether CMD+left/right was entered while an input, textarea, or contentEditable element was in focus; if so, it shouldn't go back/foward. Some sites break this if they are using custom content editable fields. If you see this again, please note which site this was on.

@bbondy are you seeing this on generic input fields? if so, that's a bug.

@diracdeltas
Copy link
Member

The broader problem is that our page navigation shortcuts are just regular javascript keyDown handlers, which any page can override by preventing the event from reaching our handler. So this is always going to be flakey.

@diracdeltas diracdeltas added the needs-info Another team member needs information from the PR/issue opener. label Feb 11, 2016
@bbondy
Copy link
Member Author

bbondy commented Feb 11, 2016

Happens on github textarea pull request or comment fields. The one I'm typing in now.

@diracdeltas
Copy link
Member

ah cool, i think this is a regression. looking into it now.

On Thu, Feb 11, 2016 at 11:46 AM, Brian R. Bondy notifications@github.com
wrote:

Happens on github textarea pull request or comment fields. The one I'm
typing in now.


Reply to this email directly or view it on GitHub
#723 (comment)
.

@diracdeltas
Copy link
Member

@bbondy i think this was due to you registering this shortcut as a localShortcut, which i reverted

@bbondy
Copy link
Member Author

bbondy commented Feb 11, 2016

but does Command+Left still work now?

@diracdeltas
Copy link
Member

yes, it works if you are in the webview

@bbondy
Copy link
Member Author

bbondy commented Feb 11, 2016

should work from chrome focus too

@bbondy
Copy link
Member Author

bbondy commented Feb 11, 2016

maybe we need a handler higher up the hierarchy instead of local-shortcuts to make both work correctly?

@diracdeltas
Copy link
Member

It doesn't work in Chrome unless the webview-area is focused

EDIT: Actually I take that back. It's unclear to me what elements are focused in Chrome, but I guess if you click outside the webview area, the shortcuts work as long as the URL bar doesn't have focus.

@bbondy
Copy link
Member Author

bbondy commented Feb 11, 2016

deceptive because you can't focus the title bar on Chrome. Click on our titlebar then Command+Left and it won't work.
Click on Chrome title bar and Command+Left and it will work.

I think we just need to mark our nav area as non focusable.

@bbondy bbondy added this to the 0.7.15 milestone Feb 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-info Another team member needs information from the PR/issue opener.
Projects
None yet
Development

No branches or pull requests

3 participants