Page MenuHomePhabricator

VisualEditor: {Ctrl,Option}+{Delete,Backspace} doesn't delete a word in an RTL wiki
Closed, ResolvedPublic

Description

Pressing Ctrl-Backspace deletes a word in a <textarea> in Firefox. It works the same way in VisualEditor when the wiki's language is English, but if it's Hebrew, it only deletes one character.

A GWT testing scenario for this would be something like this:

Given $wgLanguageCode is 'he'

And I am editing an article
And I wrote 'אחת שתיים שלוש'

When I press Ctrl-Backspace
Then the remaining text is 'אחת שתיים '


Version: unspecified
Severity: normal

Details

Reference
bz48912

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:38 AM
bzimport set Reference to bz48912.

This will (should?) get fixed when Inez does the re-write of this area, but assigning to Moriel to bug him and make sure he does it right. :-)

According to my test, this was fixed, and the behavior is as predicted on my local install. It doesn't work properly in the VE that exists in he.wikipedia, so whatever was done is new.

The fact this works without fixes is incredibly weird, since the handleDelete() function uses offsets, and those are supposed to be opposite between Hebrew and English. I'm checking into potential causes, but as far as I've seen, Inez' re-implemented code works.

Amir, if you can verify this works on your local installation, that'll be helpful. I am a bit concerned about this since it doesn't make sense (it *shouldn't* work) and I am concerned that it doesn't work on he.wiki. I want to verify it isn't some local fluke before we close this bug as resolved.