Open Bug 1452517 Opened 6 years ago Updated 4 months ago

HTML: cursor navigation, selection and deletion by backspace of closable non-editable DIVs/SPANs inside content-editable DIV

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: infalanda, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

34.67 KB, application/x-zip-compressed
Details
Attached file plunk-QEzTFZ.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180323154952

Steps to reproduce:

 - Experiment 1: Inserted non-contenditable div or span inside other content-editable div or span.
 - Experiment 2: Insert nested non-editable parts inside outer non-editable part.
 - Move caret near to non-editable part.



Actual results:

 - Press BackSpace - nothing happen.
 - Press Delete- nothing happen.
 - Press left or right arrow key - nothing happen.
 - If there is another nested non-editable part inside outer non-editable part more things can (in some condition) happen:
 -- BackSpace does not remove a whole content, but only a inside element.
 -- Delete have unpredictable results
 -- if caret is on the left side of outer part, pressing right arrow key moves cursor inside non-editable part, caret goes sometimes invisible, typing is not working.


Expected results:

 - Press BackSpace or Delete -non-editable parts should be removed.
 - Press left or right arrow key - goto over, to other side, the non-editable part
 -- If there is another nested non-editable part inside outer non-editable part more things can (in some condition) happen:
 -- BackSpace / Delete should remove whole outer element together with all inside elements.
 - Caret should never gone inside non-editable elements.

To be short: http://plnkr.co/edit/QEzTFZ?p=preview

The described problems does not exists in chrome browser at all, also IE 11 almost work fine.
It would be very nice, if Firefox will work also fine, without strange buggy partially worked workarounds. As I have seen, some of described problems are already submitted many years before - but not resolved until today - it is not very funny :)
Component: Layout: Block and Inline → Editor
Priority: -- → P3
See Also: → 685799
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: