Open Bug 1579824 Opened Last month Updated 7 days ago

[Android] selected attribute on HTML <option> doesn't work when <select> size is >1 (listbox select)

Categories

(Core :: Widget: Android, defect, P1)

ARM
Android
defect

Tracking

()

Tracking Status
firefox-esr68 --- affected
firefox70 --- affected
firefox71 --- affected

People

(Reporter: siwon_97, Unassigned)

Details

(Whiteboard: [layout:triage-discuss])

Attachments

(6 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Try the following HTML page on Fennec 68.1

<!DOCTYPE html>
<html>
<body>
<select size="3">
<option value="1">A</option>
<option value="2" selected>B</option>
<option value="3">C</option>
</select>
<select size="2">
<option value="4">D</option>
<option value="5" selected>E</option>
</select>
</body>
</html>

Actual results:

Nothing is selected. When I select something in the first menu, it is highlighted. If then I press somewhere else on the screen, the highlighting dissapear, making it impossible to know what is actually selected.

Expected results:

The B and E should be in evidence, as they are selected, as on Firefox's Windows version. When selecting other items on the drop out menus, it should leave the new selection selected.

Hello,

I have managed to reproduce your issue on the latest builds: 71.0a1 (2019-09-8), 70.0b5 and Release 68.1 with a Samsung Galaxy S8+ (Android 8.0). The issue does not occur on Android Chrome or Firefox Windows.

I will mark the issue as New.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Hardware: Unspecified → ARM

(In reply to Laurentiu Apahidean from comment #1)

Hello,

I have managed to reproduce your issue on the latest builds: 71.0a1 (2019-09-8), 70.0b5 and Release 68.1 with a Samsung Galaxy S8+ (Android 8.0). The issue does not occur on Android Chrome or Firefox Windows.

I will mark the issue as New.

Laurentiu, does this reproduce even if on Fenix?

Flags: needinfo?(laurentiu.apahidean)

(In reply to Makoto Kato [:m_kato] from comment #2)

Laurentiu, does this reproduce even if on Fenix?

I have retested it on Firefox Preview 1.4.0 (Build #12481824) 9/5 using a Samsung Galaxy S8+ (Android 8.0.0) and the issue is reproducible.

Flags: needinfo?(laurentiu.apahidean)
Component: General → Locale switching and selection

I can reproduce the issue in Firefox Reality Using GeckoView 71.

Component: Locale switching and selection → General
Product: Firefox for Android → GeckoView
Version: Firefox 68 → Trunk

Sending to [layout:triage-discuss]. Is this a Gecko Layout bug or an Android Widget style issue?

Component: General → Layout
Product: GeckoView → Core
Whiteboard: [layout:triage-discuss]

Not sure where the bug is, but this is pretty basic functionality to be broken on Android.

Component: Layout → Layout: Form Controls
Priority: -- → P1
Summary: HTML <option> selected doesn't work when<select> size is >1 → [Android] selected attribute on HTML <option> doesn't work when <select> size is >1 (listbox select)

The behavior I see is different, but equally bad. Things improve if I tap on the control.

This is likely a bug in the Android form-control implementation, which belongs under Widget:Android I think.

snorp, I know you've done some work in that area - do you know who'd be best to poke about this these days?

Component: Layout: Form Controls → Widget: Android
Flags: needinfo?(snorp)

For the record, my Firefox Preview (on play store beta-channel) on Pixel3/AndroidQ matches dbaron's rendering in comment 8, with both testcases. (testcase 2 has a different border/background, but the highlighted entries are still entirely missing as shown in dbaron's screenshot.)

Attached image Testcase1_and_2.png

Here are the screens of Firefox preview 2.0.0 on my Fairphone2 with Android 7.1.2.
After testing testcase2, it seems that testcase1 is trying to put a white highlighting on a white background. Same behaviour on Fennec 68.1.1
This is quite different from comment 8's image.

This bug seems to have various effects depending mainly on which version of Android the user is using.
Before having a Fairphone 2 that use Android 7.1.2, I had an Acer using Android 6.X and I did not have the bug. By retrying it with Fennec 68.1.1 on another Android 6.0 device (Emporia S2), I also do not notice any bug (see attached picture).

(In reply to Daniel Holbert [:dholbert] from comment #9)

This is likely a bug in the Android form-control implementation, which belongs under Widget:Android I think.

snorp, I know you've done some work in that area - do you know who'd be best to poke about this these days?

Most of the people who worked on that were Fennec frontend folks. I think the GeckoView team would like the Layout team to own this going forward if that's possible. My guess is that we have a lot of cruft here from early mobile web days that could be removed?

Flags: needinfo?(snorp)
You need to log in before you can comment on or make changes to this bug.