Closed Bug 1057552 Opened 10 years ago Closed 10 years ago

Input and contentEditable elements require pressing backspace twice to delete Hebrew characters, unless dir="auto" is specified on the element

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1034337

People

(Reporter: avnerus, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release) Build ID: 20140730040014 Steps to reproduce: This used to work before, but one day in the last couple of weeks, when flashing the latest b2g the problem appeared. When entering Hebrew text (and possibly other Right-To-Left languages), it requires 2 backspace clicks to delete one character. It doesn't happen on all fields. Example cases are SMS message input and email composition and To fields. Actual results: When pressing backspace once the letter is not deleted, on the second time it gets deleted. Expected results: It should have been deleted on the first try. Because I noticed that it doesn't happen on some fields, I've found that if I add dir="auto" to the input or contentEditable field, the problem is resolved. ********* While digging through the code I've also found another issue, but I'm not sure it's a bug. In the keyboard app in input_method_manager.js, the default input engine's click function has an incorrect definition. click: function(keyCode, isRepeat) instead of: click: function(keyCode, upperKeyCode, isRepeat) this results in the isRepeat variable getting upperKeyCode's value instead of the real one. in my case it was null instead of false/true. But I didn't notice any actual problem in the UI due to this issue. Please tell me if I should file another bug for this. Thank you! - Avner
This keeps on happening on today's latest build. I've also noticed that while dir="auto" works around the issue, whenever the test is not matched to the current direction, it requires 2 backspaces to delete a character. For example if I start the text with a hebrew sentence, press enter and write some text in English, it will require 2 backspaces to delete an English character.
Component: Gaia → Editor
Product: Firefox OS → Core
Version: unspecified → Trunk
I changed the category to Core:Editor because I noticed it's due to the logic in gecko/editor/libeditor/nsTextEditRulesBidi.cpp Also the problem goes away when chaging gecko/modules/libpref/init/all.js to: pref("bidi.edit.delete_immediately", true); Still I don't completely understand why this happens.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.