Closed Bug 1391118 Opened 7 years ago Closed 7 years ago

xslt-generated select tag pull-down does not respond to clicks

Categories

(Core :: XSLT, defect)

54 Branch
Unspecified
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- wontfix
firefox56 --- fixed
firefox57 --- fixed

People

(Reporter: sf_bugzilla, Assigned: peterv)

References

Details

(Keywords: regression)

Attachments

(1 file)

Rendering an XHTML document from an XML document using a simple XSLT with a form containing a SELECT element, the form element appears in the page, but does not respond to click events (does not "pull down").  However, if the XML and XSLT is processed externally (e.g. xsltproc), the resulting HTML works fine (the select does respond and show options).

Specifically, saving the 3 text files below to a web server, opening "option.xml" will result in a pull-down menu that doesn't, while opening "option.html" will result in a pull-down menu that works fine.

This behavior is observed in Firefox 55.0.2 on Windows 10.0.14393.  It is not observed in (at least) 38.8.0 on Linux (kernel 3.16.0-4-amd64).  It's also likely not present in most previous versions, as it was first reported by my Windows users on 2017-07-12, although the application has been in use for several years.


=========================== option.xml =========================

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="option.xslt" type="text/xsl"?>
<root />


=========================== option.xslt =========================

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        >
<xsl:output method="xml" indent="yes" />

<xsl:template match="root">
<html>
<body>
<form action="dummy.cgi" method="get">
<select name="test">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
</select>

<input name="hello" />
<input type="submit" name="submit" value="submit" />

</form>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


=========================== option.xslt =========================

<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <body>
    <form action="dummy.cgi" method="get">
      <select name="test">
        <option value="A">A</option>
        <option value="B">B</option>
        <option value="C">C</option>
      </select>
      <input name="hello"/>
      <input type="submit" name="submit" value="submit"/>
    </form>
  </body>
</html>
The last embedded file should be named "option.html" not "option.xslt".
Eric, do you know if we made any XSLT changes in 54.0.1?
Flags: needinfo?(erahm)
I'll check if we had any uplifts to 54 tomorrow, leaving ni? for now.
Probably more likely this is a change in the code for selects.
Turning off e10s fixes this for me on OS X. I'm not sure this is actually a regression between 54 and 54.0.1 as I can reproduce on OS X in 53.
Attached patch v1Splinter Review
Assignee: nobody → peterv
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(erahm)
Attachment #8900193 - Flags: review?(jaws)
Comment on attachment 8900193 [details] [diff] [review]
v1

Review of attachment 8900193 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you for the quick patch. Can you please update your commit message to mention that the namespace was required to make sure the dummy elements we create are actually HTML <option> and <select> ?
Attachment #8900193 - Flags: review?(jaws) → review+
Peter, any reason this hasn't landed yet?
Flags: needinfo?(peterv)
I'm going to land Peter's patch now for him as I don't see anything that should stand out in the patch and I'm pretty familiar with this code.
Flags: needinfo?(peterv)
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/84760282660d
xslt-generated select tag pull-down does not respond to clicks. r=jaws
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/84760282660d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Please request Beta approval on this when you get a chance.
Flags: needinfo?(peterv)
Version: 55 Branch → 54 Branch
Jared, maybe you can help?
Flags: needinfo?(jaws)
Comment on attachment 8900193 [details] [diff] [review]
v1

Approval Request Comment
[Feature/Bug causing the regression]: bug 1335483 (Firefox 54)
[User impact if declined]: select dropdowns are broken on sites that use XSLT or any namespace that is not HTML-based
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: no, but I verified the patch manually while reviewing it
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: the patch is very simple. it supplies the HTML namespace to a couple function calls that accept a namespace argument. without that argument supplied, the functions assume the current namespace in use is the desired namespace for these elements. the code has assumptions that an HTML namespace was used based on how the "option" and "select" elements in HTML work.
[String changes made/needed]: none
Flags: needinfo?(peterv)
Flags: needinfo?(jaws)
Attachment #8900193 - Flags: approval-mozilla-beta?
Comment on attachment 8900193 [details] [diff] [review]
v1

Fix for dropdown lists, includes new tests.
This isn't a new regression, but let's uplift for beta 12.
Attachment #8900193 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.