Closed
Bug 1303724
Opened 9 years ago
Closed 9 years ago
Fix issues in EdFieldSetProps.js
Categories
(MailNews Core :: Composition, defect)
MailNews Core
Composition
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 52.0
People
(Reporter: aryx, Assigned: aryx)
Details
Attachments
(1 file)
1.21 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
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
![]() |
Assignee | |
Comment 1•9 years ago
|
||
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)
Comment 2•9 years ago
|
||
(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.)
![]() |
Assignee | |
Comment 3•9 years ago
|
||
> 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 4•9 years ago
|
||
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+
Comment 5•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 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.
Description
•