New issue
Advanced search Search tips

Issue 650093 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

<select> element isn't updated after its single option removing.

Reported by alexande...@gmail.com, Sep 25 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Example URL:
https://jsfiddle.net/AlexLukin/zd3ufoaj/1/

Steps to reproduce the problem:
1. Go this JSFillde https://jsfiddle.net/AlexLukin/zd3ufoaj/1/
2. Click on the "Remove option" link.
3. 

What is the expected behavior?
After removing <option> <select> element should be immediately updated and its label "text" should vanish.

What went wrong?
<option> #o is actually removed from <select> element after clicking on #a link, but label "text" from removed option is preserved in the <select> element.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.116  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 

Comment 1 by kojii@chromium.org, Sep 26 2016

Components: -Blink Blink>Forms>Select
Status: Untriaged (was: Unconfirmed)

Comment 2 by tkent@chromium.org, Sep 26 2016

Labels: -Pri-2 Hotlist-Interop Pri-3
Status: Available (was: Untriaged)
Summary: <select> element isn't updated after its single option removing. (was: <select> element with min-width style applied isn't updated after its single option removing.)
Rperoduced without min-width.

Comment 3 by jhwon0...@gmail.com, Sep 26 2016

I'm interested in this issue

Comment 4 by tkent@chromium.org, Sep 28 2016

Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 29 2016

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

commit 238fff24c2c0dbcc3cec19a6a981b74d11928092
Author: jhwon0415 <jhwon0415@gmail.com>
Date: Thu Sep 29 03:13:14 2016

fixed <select> element isn't updated after its single option removing.

This problem is occurred because, in resetToDefaultSelection, there was no
handling when firstEnabledOption and lastSelectedOption are both nullptr.
So added this case.

BUG= 650093 

Review-Url: https://codereview.chromium.org/2372913002
Cr-Commit-Position: refs/heads/master@{#421733}

[modify] https://crrev.com/238fff24c2c0dbcc3cec19a6a981b74d11928092/AUTHORS
[add] https://crrev.com/238fff24c2c0dbcc3cec19a6a981b74d11928092/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single-expected.html
[add] https://crrev.com/238fff24c2c0dbcc3cec19a6a981b74d11928092/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html
[modify] https://crrev.com/238fff24c2c0dbcc3cec19a6a981b74d11928092/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Comment 6 by tkent@chromium.org, Sep 29 2016

Labels: M-55 OS-Android OS-Chrome OS-Linux OS-Mac
Status: Fixed (was: Started)

Sign in to add a comment