Last Comment Bug 670807 - Delete doesn't work on last character in contenteditable inline elements (such as spans) nested in another inline element
: Delete doesn't work on last character in contenteditable inline elements (suc...
Status: VERIFIED FIXED
: reproducible, testcase
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Other Branch
: All All
: -- normal (vote)
: mozilla8
Assigned To: Fabien Cazenave [:kaze]
:
Mentors:
https://bug439808.bugzilla.mozilla.or...
Depends on:
Blocks: contenteditable
  Show dependency treegraph
 
Reported: 2011-07-11 18:31 PDT by Aaron Kaluszka
Modified: 2011-09-09 00:50 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
reduced test case (945 bytes, text/html)
2011-09-08 00:49 PDT, Ioana (away)
no flags Details

Description Aaron Kaluszka 2011-07-11 18:31:47 PDT
Bug 439808 fixed most of the problems deleting elements in nested inlines, but a case still exists that does not work. Attempting to delete the last character in a contenteditable inline (which is nested in another inline) does not work when pressing Delete when positioned before the character, though Backspace does function.
Comment 1 Fabien Cazenave [:kaze] 2011-08-18 10:07:07 PDT
Bug confirmed on Aurora (Fx 7.0a2) but works for me on Nightly (Fx 0.8a1). I couldn’t find the patch that solved this issue.
Comment 2 Alice0775 White 2011-08-18 10:41:22 PDT
Fixed by Bug 439808
Comment 3 Aaron Kaluszka 2011-08-18 10:46:28 PDT
This bug was filed because Bug 439808 did not fix the full problem, but I can confirm it works now.
Comment 4 Alice0775 White 2011-08-18 10:51:29 PDT
I checkd cached m-i hourly, and confirmed this fixed by Bug 439808
Comment 5 Alice0775 White 2011-08-18 11:09:14 PDT
Please ignore comment #2 and comment #4, I misread str.


Fixed range(m-c)
Fails:
http://hg.mozilla.org/mozilla-central/rev/504a1a927d39
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110725 Firefox/8.0a1 ID:20110725111747
Works:
http://hg.mozilla.org/mozilla-central/rev/982a5835fba1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110726 Firefox/8.0a1 ID:20110726025330


Fixed range(m-i)
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/f8768a3e3a9f
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110725 Firefox/8.0a1 ID:20110725115531
Works:
http://hg.mozilla.org/integration/mozilla-inbound/rev/167f6642efd4
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110725 Firefox/8.0a1 ID:20110725141505
Pushlog
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f8768a3e3a9f&tochange=167f6642efd4

Fixed by:
167f6642efd4	Fabien Cazenave — Bug 688599 - do not expand selection for deletion outside of the active editing host; r=ehsan When a selection in an inline element is to be deleted, it is first expanded to the parent block in order not to leave any empty inline element. This patch ensures that the selection cannot be expanded outside of the contentEditable element (active editing host).
Comment 6 Fabien Cazenave [:kaze] 2011-08-19 01:41:06 PDT
That’s bug 668599 then, thanks for finding out!
Comment 7 Ioana (away) 2011-09-08 00:49:36 PDT
Created attachment 559067 [details]
reduced test case
Comment 8 Ioana (away) 2011-09-08 01:01:33 PDT
Verified on:
Mozilla/5.0 (Windows NT 6.0; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (X11; Linux x86_64; rv:8.0a2) Gecko/20110907 Firefox/8.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110831 Firefox/9.0a1

STR:
 1. Open the attached test case.
 2. Place the caret in front of the comma before the last span.(the caret cannot be placed right before the span because of bug #685452)
 3. Press the Delete key twice.

Expected Results:
 The first key press deletes the space before the last span and the second one deletes the last span.

Actual Results:
 The last span (blue letter) cannot be deleted.

Workaround:
 Select the last span then press Delete.
Comment 9 Fabien Cazenave [:kaze] 2011-09-08 07:43:36 PDT
Working on it.
Comment 10 Aaron Kaluszka 2011-09-08 09:24:16 PDT
IMO, another bug should have been filed for that case -- deleting entire spans. This bug was for deleting characters inside of a nested span.
Comment 11 Fabien Cazenave [:kaze] 2011-09-08 09:57:45 PDT
FTR, see bug 685445 and bug 685452 (follow-ups).
Comment 12 Aaron Kaluszka 2011-09-08 10:41:39 PDT
Re-resolving since the follow-ups are actually a different problem.
Comment 13 Ioana (away) 2011-09-09 00:50:57 PDT
Bug #685799 was filed for the case from comment #8. Marking this one back as closed.

Note You need to log in before you can comment on or make changes to this bug.