Closed Bug 1097575 Opened 11 years ago Closed 9 years ago

[Messages] Number of empty contenteditable spans inside recipients input is constantly growing if user removes all typed characters

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: azasypkin, Unassigned)

References

Details

(Whiteboard: [sms-papercuts])

STR: 1. Open Messages app and go to message composer; 2. Focus on recipients input; 3. Enter just one character and remove it; 4. Repeat step #3 several times and observe recipients container (#messages-recipients-list) in dev tools inspector. Expected result: there should be only one contenteditable span; Actual result: number of empty contenteditable spans is constantly growing when you repeat step #3. It happens only if user enters first recipient and also all redundant spans are got rid of once user confirms (assimilates) recipient so it's not that critical, but nice to fix anyway.
Well, it'll likely become a problem once contenteditable element if forced to always have at least one <br> inside, in this case we'll have several focusable areas inside recipients input.
I think we set a "width: 0" on empty placeholders (but we handle the tap event on the whole panel and focus them programmatically). Need to check this though.
(In reply to Julien Wajsberg [:julienw] from comment #2) > I think we set a "width: 0" on empty placeholders (but we handle the tap > event on the whole panel and focus them programmatically). Need to check > this though. Nope, there is "width: auto" + "flex-grow: 1" (that will make things even worse, but I was going to remove it in bug 1080832 because "we handle the tap event on the whole panel and focus them programmatically" is more than enough)
One more note: we use ".recipient[contenteditable=true]:empty:not(:last-of-type)" to hide these redundant spans. :empty part won't match once we have anything inside, eg. <br> :)
Blocks: 1168118
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.