Last Comment Bug 670809 - Backspace & Delete don't work on first or last character in a selection in contenteditable inline elements (such as spans) nested in another inline element
: Backspace & Delete don't work on first or last character in a selection in co...
Status: VERIFIED FIXED
: reproducible, testcase
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Other Branch
: x86 Windows 7
: -- normal (vote)
: mozilla8
Assigned To: Fabien Cazenave [:kaze]
:
: Makoto Kato [:m_kato]
Mentors:
Depends on:
Blocks: contenteditable
  Show dependency treegraph
 
Reported: 2011-07-11 18:42 PDT by Aaron Kaluszka
Modified: 2011-08-19 01:41 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Aaron Kaluszka 2011-07-11 18:42:50 PDT
Step 1: Select text in a contenteditable inline (which is nested in another inline) such that either the first or last character is included in the selection.
Step 2: Press backspace or delete.

Expected Results: All selected text is deleted.

Actual Results:
- If the selection included the first character, only the last character in the selection is deleted and the text is deselected.
- If the selection included the last character, nothing is deleted and the text is deselected.
- If the selection included all characters, nothing is deleted and the text remains selected.
Comment 1 Fabien Cazenave [:kaze] 2011-08-18 10:07:06 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:20 PDT
Fixed by Bug 439808
Comment 3 Aaron Kaluszka 2011-08-18 10:46:11 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:42 PDT
I checkd cached m-i hourly, and confirmed this fixed by Bug 439808
Comment 5 Alice0775 White 2011-08-18 11:08:54 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:01 PDT
That’s bug 668599 then, thanks for finding out!

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