New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657558 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 600416
issue 603386


Show other hotlists

Hotlists containing this issue:
MacViews-Task-Queue


Sign in to add a comment

MacViews single line textfields should scroll to the beginning when they lose focus

Project Member Reported by sdy@chromium.org, Oct 19 2016

Issue description

Version: 56.0.2895.0
OS: 10.11

What steps will reproduce the problem?
(1) Type enough text into a field that it starts to scroll horizontally.
(2) Click or tab to another control.

What is the expected output?
The text field scrolls to the beginning.

What do you see instead?
The text field stays in the same spot.
 

Comment 1 by shrike@chromium.org, Oct 19 2016

Labels: -Pri-3 Proj-HarmonyControls M-56 Pri-2
Owner: karandeepb@chromium.org
Status: Assigned (was: Untriaged)
over to karandeepb@ for a look

Comment 3 by tapted@chromium.org, Dec 12 2016

Blocking: 603386
Labels: -Pri-2 -M-56 M-58 Pri-3
karandeepb: I heard you were transferring to extensions.  Will you still have time to look into this?  If not, please unassign, so I can find a new owner.
Done! I'll go through the other bugs I am assigned, and un-assign those that I won't be working on.
Owner: ----
Status: Available (was: Assigned)
Blocking: 600416
Cc: -ellyjo...@chromium.org
Labels: MacViews-Controls
Owner: ellyjo...@chromium.org
Status: Assigned (was: Available)
Labels: -M-58
M-58 clearly didn't happen.

I don't know how to triage MacViews in depth, so not changing owner/priority.
The main platform difference here is that when Cocoa textfields gain or lose focus, they always show the start of their contents, not the end. When Views textfields gain focus, they show the end of their contents, and when they lose focus, they do not change what they show.
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa2d40dd48636a51389970a21eb1dce68dd506b0

commit fa2d40dd48636a51389970a21eb1dce68dd506b0
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Thu Aug 03 13:34:31 2017

views: support Mac textfield-focus behavior

On Mac, textfields always scroll to the start when gaining or losing focus;
this change implements that by:

1) On keyboard focus, doing a reversed SelectAll, so that the new selection
   "ends" at the logical start on Mac;
2) In OnBlur(), moving the selection to the logical start if PlatformStyle
   calls for same

Bug:  657558 
Change-Id: I81c01f6ae5a546f1abb51a28638091907379d04e
Reviewed-on: https://chromium-review.googlesource.com/598122
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491723}
[modify] https://crrev.com/fa2d40dd48636a51389970a21eb1dce68dd506b0/ui/views/controls/textfield/textfield.cc
[modify] https://crrev.com/fa2d40dd48636a51389970a21eb1dce68dd506b0/ui/views/style/platform_style.cc
[modify] https://crrev.com/fa2d40dd48636a51389970a21eb1dce68dd506b0/ui/views/style/platform_style.h
[modify] https://crrev.com/fa2d40dd48636a51389970a21eb1dce68dd506b0/ui/views/style/platform_style_mac.mm

Status: Fixed (was: Assigned)
Cc: pnangunoori@chromium.org
Labels: TE-Verified-M62 TE-Verified-62.0.3178.0
Tested the issue on Mac OS 10.12.6 using Chrome Canary version M62 - 62.0.3178.0 as per the issue mentioned in original comment. Observed that issue is working as intended (The text field stays in the same spot even after clicking or tabbing to other control). Hence adding TE-Verified label. Attached the screenshot and sample HTML file used for reference.

Thank you!
657558.mov
1.8 MB Download
123.html
372 bytes View Download

Sign in to add a comment