Closed Bug 1303724 Opened 5 years ago Closed 5 years ago
Fix issues in Ed
Field Set Props .js
EdFieldSetProps.js has the following code: > legendElement = fieldsetElement.firstChild; > if (legendElement && legendElement.localName == "LEGEND") This has the following issues: 1. Assumes <legend> directly follows <fieldset> without whitespace. 2. Assumes <legend> is first element child. 3. Assumes localName returns uppercase, but it returns lowercase since Gecko 2, ee https://developer.mozilla.org/en-US/docs/Web/API/Node/localName#Notes
To test, insert the following HTML into a message and double click the legend: <fieldset> Field 1: <input type="text" length="10" id="field1"> Field 2: <input type="text" length="10" id="field2"> <legend>This <b>is</b> it!</legend> </fieldset>
Attachment #8792485 - Flags: review?(jorgk)
(In reply to Sebastian Hengst [:aryx][:archaeopteryx] from comment #1) > To test, insert the following HTML into a message ... That's easily done with my add-on ThunderHTMLedit ;-) > and double click the legend: I can click the legend until I'm green in the face. Nothing happens. Well, if I'm really lucky and double-click after the "!", I sometimes get the Advanced Property Editor for the <legend>. However, if I double-click somewhere in the fieldset, I can edit the legend if I have your patch applied. So while your patch is a 500% improvement, should the legend alone be double-clickable? Or is this another bug? (BTW, I'm relocating from Spain to Berlin tomorrow, so you're other review will have to wait a few days.)
> So while your patch is a 500% improvement, should the legend alone be > double-clickable? Or is this another bug? Difficult, because double click is also the default to select the current word in the legend. Double clicking the border always works.
Comment on attachment 8792485 [details] [diff] [review] patch, v1 OK, you convinced me ;-) Perhaps the commit message should be a bit more descriptive: Find legend in fieldset reliably.
Attachment #8792485 - Flags: review?(jorgk) → review+
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 52.0
You need to log in before you can comment on or make changes to this bug.