New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600662 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
inactive
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

contenteditable element cannot delete a <br> tag if there is no leading + trailing characters

Project Member Reported by changwan@chromium.org, Apr 5 2016

Issue description

From "Settings > About Chrome"
Application version: any version
OS: Android

URLs (if applicable): https://jsfiddle.net/odcfngd0/

Steps to reproduce:
1. Type 'a' and then press enter key.
2. Press up arrow key, and then left arrow key.
3. Press backspace. (delete 'a')
4. Press backspace again.

Expected result:
The first backspace in step #3 should not delete the new line.
The second backspace in step #4 should not delete anything.
I should be able to delete everything, and resume the hint text.

Actual result:
The first backspace in step #3 deletes 'a' and also the new line after it.
The second backspace in step #4 does not delete anything.
After this, I cannot delete <br> tag using backspace. On desktop, we can remove <br> tag using backspace at step #4.

<br> at the end of contenteditable gets systematically ignored - you cannot select it, and you cannot see it.

Also, when you type an enter key, you get two <br> tags. If you type two enter keys, you get three <br> tags.

Originally filed as b/27441950

 

Comment 1 by lima...@gmail.com, Apr 5 2016

Sorry for my ignorance.
You mentioned 'android'. Is there any method to insert arrow keys on android device?
Cc: tkent@chromium.org
Labels: -Pri-3 Pri-2
Hmm... I can either change InputMethodController to call deleteKeyPressed() in certain conditions, or change TypingCommand::deleteSelection() to behave differently.

tkent@,
it seems that TypingCommand::deleteKeyPressed() deletes the entire content when there is no visible position in the editing root, while that logic is missing in TypingCommand::deleteSelection(). Is this intended? If so, could you explain why it is designed this way?

I mean touching the input form and move the cursor to in front of 'a'. Of course, you can pair a bluetooth keyboard to actually press arrow keys on Android.
Cc: yosin@chromium.org
It sure sounds like a simple oversight to me.  I'd go ahead and write the patch that adds the extra deletion behavior in deleteSelection(), and if that doesn't make any layout tests fail, it's probably good to go.

Comment 5 by tkent@chromium.org, Apr 7 2016

Cc: -tkent@chromium.org
Cc: changwan@chromium.org
Owner: yabinh@chromium.org
reassigning to yabinh@
Talked to yabinh@ offline. It seems that Google IME (Latin, Korean, Indic) now sends backspace key instead of calling deleteSurroundingText() (probably as a workaround of this and other similar issues). Also Samsung IME always has been doing so. I think we should lower the priority of this bug unless there is a major IME who still calls deleteSurroundingText() in this situation. yabinh@, could you check?

Comment 8 by yabinh@chromium.org, Jul 13 2016

Only a few IME apps can't delete the <br> tag, like Marathi Input Keyboard(GrowUp Infotech), Indic Keyboard(Indic project). But they are not widely used. I haven't found any main IME apps that can't delete the <br> tag.

Comment 9 by aelias@chromium.org, Jul 15 2016

Labels: -Pri-2 Pri-3
Owner: aelias@chromium.org
Sounds good, deprioritizing.
Cc: jfernan...@igalia.com
Status: WontFix (was: Assigned)
I understand IMEs mostly do send backspace key for empty textboxes nowadays.

Sign in to add a comment