Issue metadata
Sign in to add a comment
|
[Regression] Text selection by keyboard broken in address bar
Reported by
krinklem...@gmail.com,
Jul 13
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3489.0 Safari/537.36 Steps to reproduce the problem: Problem 1, Steps: 1. Put the cursor in the address bar, e.g. in the middle of a url. 2. Hold down shift and then press the DOWN arrow. Problem 1, Expected vs Actual: In Chrome stable, this established a text selection from the cursor point to the end of the url. Allowing the user to, for example, quickly remove part of the url and navigate there, or to replace it with something else. In actually, it appears to do nothing, except for some confusing interactions with the suggestions menu. Problem 2, Steps: 1. Put the cursor in the address bar, e.g. at end of a url. 2. Hold down shift and then press the UP arrow. 3. Keep holding shit, also holding alt, and pressing the RIGHT arrow three times. Problem 2, Expected vs Actual: This is meant to select the entire url, except the first three word boundaries, typically protocol and hostname (e.g. it would select "/foo/bar/baz?a=b&c#f" of "https://example.org/foo/bar/baz?a=b&c#f" ). What is the expected behavior? What went wrong? This works in Chrome stable, but stopped working in Chrome canary. Did this work before? Yes Chrome 67.0.3396.99 stable Chrome version: 69.0.3489.0 Channel: canary OS Version: OS X 10.13.5 Flash Version:
,
Jul 13
,
Jul 13
The mouse equivalent of this is bug 731252 .
,
Jul 13
Speculatively assigning to spqchan based on ownership of the related bug (#3).
,
Jul 16
Ooh - thanks for filing this! This is not related to Issue 731252 . E.g. this selection mode works in other toolkit-views textfields on Mac (e.g. Add bookmark). OmniboxViewViews::ExecuteTextEditCommand() intercepts ui::TextEditCommand::MOVE_DOWN and makes it do model()->OnUpOrDownKeyPressed(1); That's OK. What's not OK is that OmniboxViewViews::HandleKeyEvent() incorrectly assumes that all ui::VKEY_DOWN are TextEditCommand::MOVE_DOWN when in fact they could also be TextEditCommand::MOVE_DOWN_AND_MODIFY_SELECTION, which shouldn't trigger this behavior (at least on Mac). In fact... a user can remap a down arrow to whatever text editing command they like via ~/Library/KeyBindings/DefaultKeyBinding.dict but a good fix for this is probably just to check for `shift` on Mac inside the ui::VKEY_DOWN case for OmniboxViewViews::HandleKeyEvent()
,
Aug 29
,
Aug 31
Over to elly to find an owner.
,
Sep 5
Similar to Problem 1, the Shift-Up keystroke no longer works in Chrome 69's Omnibox as it did in Chrome 68 and prior. Chrome 68 and prior: Shift-Up in the Omnibox selects text from the cursor to the beginning. Chrome 69: Shift-Up does nothing except for some confusing interactions with the suggestions menu.
,
Sep 5
Jeff Tulley noticed that in Chrome 69, Shift-Command-{Up,Down} behave as Shift-{Up,Down} did in Chrome 68 and prior.
,
Sep 6
Issue 881369 has been merged into this issue.
,
Sep 6
,
Sep 9
Issue 882210 has been merged into this issue.
,
Sep 13
Issue 883729 has been merged into this issue.
,
Sep 18
pkasting: Is there any reason why shift-up and shift-down shouldn't select text before/after the cursor position on other platforms? Seems to me that this would be useful everywhere and it seems to be the default behavior in Windows text fields.
,
Sep 18
What Windows text fields did you try? While this works in Edge, it doesn't work in File Explorer, Notepad, IE, or Firefox. I'd be inclined to fix this on Mac and leave as-is on Windows; shift-home/end are the canonical ways to do this there. I could be convinced otherwise (in part because Edge supports this).
,
Sep 19
> What Windows text fields did you try? I tried a few different text fields in dialogs in the control panel and Outlook. It also works throughout Chrome (text fields in Blink and the search field at the top of various Web UI pages (chrome://settings, chrome://bookmarks, etc.)). To me, this looks useful, not disruptive (shift-up/down currently doesn't do anything distinct from unmodified up/down), and simple to implement.
,
Sep 19
Is there an easy way to check how it was behaving on Chrome 68 on Windows and see if we should consider this being a regression?
,
Sep 19
It wouldn't be a regression on Windows since we've never supported this there. It's a regression on Mac.
,
Sep 20
pkasting: Thanks, that makes sense
,
Sep 21
pkasting: Have I convinced you that this is worth adding to Windows? Or should I attempt more convincing? :) FWIW, "adding" this to all desktop platforms is really just removing the Mac ifdef in https://crrev.com/c/1228576.
,
Sep 27
If you think it makes sense to add, I think you should go for it. That's partly because you own this and it's your call, so you should do what you want even if I strongly disagree :). But it's also because I'm not strongly opposed to this. I'd omit it mostly out of principle because it feels like a Linux/Macism and not a Windows native behavior, and I try to avoid bringing other platforms' behaviors to Windows, but I don't think that's a strong reason. And if this works in at least some places in Windows, maybe it's a UWP-ism, or some other "modern" Windows behavior, in which case we should support it.
,
Oct 1
jdonnelly: I can remove the ifdef in my branch, but I won't be able to test on Windows. Should we make this a separate bug or can someone test my branch on Windows to confirm?
,
Oct 4
maxmathieu: Go ahead and land what you've got. I just filed https://crbug.com/892216 to bring the behavior to the other platforms.
,
Oct 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aa268735dc3916c9cf119bddc572e7e64cdb482c commit aa268735dc3916c9cf119bddc572e7e64cdb482c Author: Max Mathieu <maxmathieu@google.com> Date: Thu Oct 04 18:01:20 2018 Fix regression with Shift+Up/Down in Omnibox on OSX When in Omnibox, Shift+Up/Down should behave like other input fields. Bug: 863543 Change-Id: I477752ebf08b3ae0065e141cc63c4c0c87f6f181 Reviewed-on: https://chromium-review.googlesource.com/c/1228576 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Max Mathieu <maxmathieu@google.com> Cr-Commit-Position: refs/heads/master@{#596753} [modify] https://crrev.com/aa268735dc3916c9cf119bddc572e7e64cdb482c/chrome/browser/ui/views/omnibox/omnibox_view_views.cc [modify] https://crrev.com/aa268735dc3916c9cf119bddc572e7e64cdb482c/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc
,
Oct 9
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by meh...@chromium.org
, Jul 13Components: -UI UI>Browser>Omnibox
Labels: Proj-MacViews