Skip to main content

Bug Tracker

Side navigation

#11170 closed bug (invalid)

Opened January 13, 2012 12:08PM UTC

Closed January 13, 2012 01:47PM UTC

$('selector for element containing <option> not surrounded by <select> ').html() not working properly on Android 2.3.4 browser

Reported by: carl-johan.blomqvist@citro.se Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

The version(s) of jQuery affected / Information on other jQuery versions tested, including whether or not the issue is reproducible there:

Same results in jQuery 1.6.4 & 1.7.1

The browser (or browsers) that you are able to reproduce the bug in, including version numbers / Information on other browsers where the issue does not occur:

Doesn't work in: Android 2.3.4

Works fine in: Chrome 16 (desktop)

Step-by-step instructions on how to reproduce the issue, including any required system configuration changes / A link to a reduced, working demo/test case that will never move (jsFiddle is good for this):

http://jsfiddle.net/cjblomqvist/RzhAW/

A description of what you expect to happen, and what actually happens:

The popup/alert message is supposed to show exactly the same text on both sides of the === (which it does in Chrome 16), but instead in Android 2.3.4 the element is stripped on the only the text-node inside the option-element is shown on the left side (hence, I'd guess it's removed when accessing the .html() or when converted from string to jQuery element)

Attachments (0)
Change History (1)

Changed January 13, 2012 01:47PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

That's invalid markup. An <option> cannot have a <div> as a parent. When we process an $("<option ...>") internally we actually have to wrap it in a <select>.