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

Issue 771216 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Incorrect option being selected when clicking an option within a select element

Reported by t...@patronmanager.com, Oct 3 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Example URL:
https://jsfiddle.net/tlfud/f1j7c4zw/

Steps to reproduce the problem:
1. Click an option after the second option within the select list.
2. Observe that the highlighted item is NOT the one you clicked.

What is the expected behavior?
The option that you click should be the one highlighted.

What went wrong?
The wrong option is selected/highlighted.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes This worked in Chrome 60.

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version: 

This markup / CSS provided in the jsFiddle use flexbox to pull the select element down so that it occupies the full height of its container. This seems to cause the wrong option to be selected when you click on an option. The jsFiddle replicates the markup / CSS of a React application I'm working on that exhibits the same problem. I simplified it down to a minimal repro case. There's no Javascript involved here. This is pure HTML and CSS. You can also see the problem here: http://select-bug-patrontechnology.fwd.wf/. This is a simple React app exhibiting the same problem.
 
Here is a simplified jsfiddle with fewer containment elements and CSS classes that still demonstrates: https://jsfiddle.net/tlfud/zas7zc9g/

Comment 2 by woxxom@gmail.com, Oct 3 2017

Bisect info: 482802 (good) - 482820 (bad)
https://chromium.googlesource.com/chromium/src/+log/14552443..340ecaca?pretty=fuller
Suspecting r482803 "Listbox SELECT: Do not force layout on OPTION element selection"
Landed in 61.0.3143.0

Comment 3 by rtoy@chromium.org, Oct 3 2017

Components: -Blink Blink>Forms>Select
The simplified jsfiddle shows the issue clearly with Chrome 62 on Linux.

Cc: pbomm...@chromium.org gov...@chromium.org e...@chromium.org
Labels: -Type-Bug -Pri-2 ReleaseBlock-Stable M-61 M-62 M-63 Pri-1 Type-Bug-Regression
Owner: skobes@chromium.org
Status: Assigned (was: Unconfirmed)
Bisect result :
You are probably looking for a change made after 482802 (known good), but no later than 482803 (first known bad).
CHANGELOG URL:
The script might not always return single CL as suspect as some perf builds might get missing due to failure.
  https://chromium.googlesource.com/chromium/src/+log/145524431de20a7e4d8738065b7855132c02e250..6eddce943df5153b5d4d0294b3b13bb35e492afe
Since tkent@ is OOO assigned the issue to Steve.
Cc: abdulsyed@chromium.org

Comment 7 by e...@chromium.org, Oct 3 2017

Owner: e...@chromium.org
Attempting revert.

Comment 8 by tkent@chromium.org, Oct 4 2017

Labels: -Arch-x86_64 OS-Chrome OS-Fuchsia OS-Linux OS-Mac
Clicking "Item 28" correctly selects "Item 28", but the SELECT content is scrolled unexpectedly.


Project Member

Comment 9 by bugdroid1@chromium.org, Oct 4 2017

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

commit ac6dc703d2e56a2cef302ddb4140ba65bf893444
Author: Emil A Eklund <eae@chromium.org>
Date: Wed Oct 04 22:16:51 2017

Revert "Listbox SELECT: Do not force layout on OPTION element selection."

This reverts r482803 (commit 6eddce943df5153b5d4d0294b3b13bb35e492afe).
Broke option hit testing when combining a select and flexbox sometimes.

Bug:  771216 

Original change's description:
> Listbox SELECT: Do not force layout on OPTION element selection. 
> 
> Adjust scroll position in PaintLayerScrollableArea::UpdateAfterLayout(), instead of
> Document::UpdateStyleAndLayoutIgnorePendingStylesheets() followed by scrolling.
> 
> Bug: 556801, 620408
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I2bd014b2f7950f1a51dbfa5067638013736d62dc
> Reviewed-on: https://chromium-review.googlesource.com/542059
> Reviewed-by: Steve Kobes <skobes@chromium.org>
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#482803}

TBR=skobes@chromium.org,tkent@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 556801, 620408
Change-Id: I6861c3ea1ab3aa4e7ee8365bc21e444a477608ca
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/699594
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506539}
[delete] https://crrev.com/95dd6223d1225dfeb444df6dcdeb16c29b7aaaa0/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/html/HTMLSelectElement.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.idl

Comment 10 by e...@chromium.org, Oct 4 2017

Status: Fixed (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-61; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-61 label, otherwise remove Merge-TBD label. Thanks.
eae@ - can you please confirm if this needs to be reverted in M62 as well?
Cc: keta...@chromium.org
We're not planning any further M61 releases for Android and Desktop. Please request a merge to M62 ASAP if needed so it can be included in this week last M62 Beta release.

+ ketakid@ (M61 Chrome OS TPM) to decide on M61 merge for chrome os.

Comment 14 by e...@chromium.org, Oct 10 2017

Unless this affects a real-world website I'm reluctant to merge it into M62 given the complexity of the change.
This affects a production product that we sell; there are 700 orgs affected by this bug

Comment 16 by e...@chromium.org, Oct 10 2017

Re 15, dave: Can you confirm whether the fix worked for your product?
We're a little unsure how we read this ticket to know which build to pull for testing. Do we have to manually download a nightly build from one of the channels? Can you point us in the right direction? 

Comment 18 by e...@chromium.org, Oct 10 2017

If you could download a Canary build from https://www.google.com/chrome/browser/canary.html and test there that would help us confirm that the fix solves your problem. Thank you and sorry for the inconvenience.

This fix should be present in either Canary channel or latest M63 Dev channel:

Canary: https://www.google.com/chrome/browser/canary.html


This is a demo of our app (it's a point-of-sale app to sell tickets to events) on Chrome 61 that demonstrates the bug

https://app.hyfy.io/v/ablBrlwezcU/

And on Chrome Version 63.0.3236.0 (Official Build) canary (64-bit) the bug is fixed:

https://app.hyfy.io/v/ab8xRWk0zcU/

(The impact of this bug, and why it's so critical, is that our customers are inadvertently selling tickets for the wrong events because they don't realize that the wrong event has been selected)

Comment 21 by e...@chromium.org, Oct 10 2017

Labels: Merge-Request-62
Thank you.
Project Member

Comment 22 by sheriffbot@chromium.org, Oct 10 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: We are only 6 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-62 Merge-Approved-62
Approving merge to M62. Branch:3202

Comment 24 by e...@chromium.org, Oct 10 2017

Labels: -Merge-TBD -Merge-Approved-62 merge-merged-62
Project Member

Comment 25 by bugdroid1@chromium.org, Oct 10 2017

Labels: merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95dd931e19fc229aad1d96eb583984def7cd0f9c

commit 95dd931e19fc229aad1d96eb583984def7cd0f9c
Author: Emil A Eklund <eae@chromium.org>
Date: Tue Oct 10 21:43:44 2017

Revert "Listbox SELECT: Do not force layout on OPTION element selection."

This reverts r482803 (commit 6eddce943df5153b5d4d0294b3b13bb35e492afe).
Broke option hit testing when combining a select and flexbox sometimes.

Bug:  771216 

Original change's description:
> Listbox SELECT: Do not force layout on OPTION element selection.
>
> Adjust scroll position in PaintLayerScrollableArea::UpdateAfterLayout(), instead of
> Document::UpdateStyleAndLayoutIgnorePendingStylesheets() followed by scrolling.
>
> Bug: 556801, 620408
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I2bd014b2f7950f1a51dbfa5067638013736d62dc
> Reviewed-on: https://chromium-review.googlesource.com/542059
> Reviewed-by: Steve Kobes <skobes@chromium.org>
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#482803}

TBR=eae@chromium.org, skobes@chromium.org, tkent@chromium.org

(cherry picked from commit ac6dc703d2e56a2cef302ddb4140ba65bf893444)

Bug: 556801, 620408
Change-Id: I6861c3ea1ab3aa4e7ee8365bc21e444a477608ca
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/699594
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#506539}
Reviewed-on: https://chromium-review.googlesource.com/710517
Cr-Commit-Position: refs/branch-heads/3202@{#647}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[delete] https://crrev.com/a0e2577b53b4fe4ab31a9463820c7e4f4ea0f274/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/html/HTMLSelectElement.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.idl

Cc: sc00335...@techmahindra.com
 Issue 774080  has been merged into this issue.

Sign in to add a comment