Closed Bug 781438 Opened 12 years ago Closed 12 years ago

Cannot change the value of the currently selected <select> field in a mozbrowser iframe

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: rudyl, Assigned: schien)

References

Details

Attachments

(7 files)

STR
====

1. Launch Browser app. with B2G Desktop build or on B2G device.
2. Go to the following link to test <select>
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option
3. Click the <select>, the value selector overlay will show up
4. Select one of the options and click [OK]

Actual result:
 - The selected option was not set into the <select> 

Expected result:
 - The selected option would be set as the new value

Note:
 1. The same scenario could work in UI Test app.
 2. The value could not be set because we could not get the focus, it would return at:
http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/forms.js#110
Tested this - and confirm that this is a bug. The select doesn't show the drop-down for Volvo/Saab/Mercedes/Audi. On FF the select displays the dropdown.

Tested on Linux Mint Maya and FF 14.01
b2g version - b2g 17.0a1; latest gaia source
Hi Gangadhar,

Please informed this issue is about changing the selected option.

From my test, the options could be shown as an fullscreen overlay instead of a drop down menu.
  - B2G nightly on Mac
  http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/b2g-17.0a1.en-US.mac64.dmg

  - Latest Gaia: ed8a01e74a0c665c19ce8fc289cfe84800aa7603

Thanks for your input.
Rudy, confirmed that the bug happens on Linux too. Latest gaia
- cd9e40a0188709289d6724b2edee4595bac2a9c3

Still waiting on the latest b2g for Linux, but am guessing this is not an issue with b2g. I can check the source you mentioned to find out more about the root cause. Is the forms.js the main engine of display where the individual HTML elements are implemented (before Gecko renders them).
I get the same as of today's gaia and gecko git, on Nexus S. At first. Then I dunno what I did, looks like zoomming/unzoomming on the page triggered worksform ?
This is before tapping inside the <select>, nothing is selected.
The list is okay, and I select a stop then I tap 'Ok'.
This is what I get after I tapped 'Ok' once checked an element in the list. Not only the displayed value is still the default one, but validating the form produce an error explaining no stop has been selected.
When validating the form, the JS code of the website does not detect any change in the stop selection, like the <select> element had no effect.
Nominating per the relevant dup this is connected to.
blocking-basecamp: --- → ?
OS: Mac OS X → Gonk
Hardware: x86 → ARM
blocking-basecamp: ? → +
Assignee: nobody → cyu
FormAssistant.handleEvent() and FormAssistant.receiveMessage() are in different processes in this case. That is, saving this.previousTarget in handleEvent() can't be seen in receiveMessage(). Looks like another bug from OOP.
This issue also could be reproduced with "UI Test" app. of current Gaia, rev: cec9116d891c4da371beb958c58095e40ed2cf80.
UI Test has been changed to OOP now.
previousTarget is set in a FormAssist object which create by different process, but MozKeyBoard still using globalmessagemanager to callback forms.js.
Therefore, wrong FromAssist get callback and will not have correct previousTarget to modify selected option.
Assignee: cyu → schien
Attachment #656322 - Flags: review?(21)
Summary: Cannot get the focus of mozbrowser <select> to set the value → Cannot change the value of the currently selected <select> field in a mozbrowser iframe
https://hg.mozilla.org/mozilla-central/rev/418d50c7c3a5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
QA Contact: jsmith
Whiteboard: [qa+]
Depends on: 787264
Whiteboard: [qa+] → [qa verification blocked]
Whiteboard: [qa verification blocked] → [qa+]
Keywords: verifyme
Whiteboard: [qa+]
Tested on an 9/12 Otoro build, this isn't working for me via the browser. I went to bugzilla.mozilla.org --> search, selected one of the select fields, changed the value, and tried to select okay. When I hit okay, nothing happened. The prompt didn't disappear either. Any ideas?
Keywords: verifyme
Whiteboard: [qa verification failed]
@jsmith: I tried your test step on my Otoro (9/13 build) and <select> works fine. Could you provide adb logcat to me?
Dear SC, 

This issue is not 100% reproducible, but Ian and I could reproduce this issue for several times.
When it occurs, it would generate the following error message.

E/GeckoConsole(  105): [JavaScript Error: "NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" {file: "jar:file:///system/b2g/omni.ja!/components/MozKeyboard.js" line: 69}]

FYI.
(In reply to Rudy Lu [:rudyl] from comment #20)
> Dear SC, 
> 
> This issue is not 100% reproducible, but Ian and I could reproduce this
> issue for several times.
> When it occurs, it would generate the following error message.
> 
> E/GeckoConsole(  105): [JavaScript Error: "NS_ERROR_NOT_INITIALIZED:
> Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED)
> [nsIMessageSender.sendAsyncMessage]" {file:
> "jar:file:///system/b2g/omni.ja!/components/MozKeyboard.js" line: 69}]
> 
> FYI.

I'll file a followup bug for this.
Depends on: 791036
Followup bug for this is tracked in bug 791036.
QA Contact: jsmith
Whiteboard: [qa verification failed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: