New issue
Advanced search Search tips

Issue 845329 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 837546



Sign in to add a comment

Contenteditable with plaintext-only shows broken writing direction option

Project Member Reported by l...@chromium.org, May 22 2018

Issue description

What steps will reproduce the problem?
(1) Enter text in a contenteditable, plaintext-only element
(2) Right click, see 'Writing Direction' in context menu, change to Right-to-Left

fiddle: https://jsfiddle.net/bvbncfab/

What is the expected result?
The context menu for contenteditable=plaintext-only elements should either support changing Writing Direction or not show the option in the context menu.

What happens instead?
Nothing happens, writing direction is the same.

 

Comment 1 by l...@chromium.org, May 22 2018

Blocking: 837546

Comment 2 by yosin@chromium.org, May 28 2018

Components: -Blink>Editing Blink>Editing>Command
Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
There are two options:
 1. Disable "writing direction" menu
 2. Change command implemetnations

# Context Menu
See WebContextMenuData
  // Writing direction menu items - values are unions of
  // CheckableMenuItemFlags.
  int writing_direction_default;
  int writing_direction_left_to_right;
  int writing_direction_right_to_left;

ContextMenuController::ShowContextMenu() sets these values by using
EditingStyle::SelectionHasStyle()

# Command Implementations
Writing direction change commands are implemented in:
- StyleCommands::ExecuteMakeTextWritingDirectionLeftToRight()
- StyleCommands::ExecuteMakeTextWritingDirectionRightToLeft()
- StyleCommands::ExecuteMakeTextWritingDirectionNatural()
They insert DIV element with style="direction: rtl".

Since cE=plaintext-only should not have non-Text node, we should use DIR attribute
for cE=plainttext-only.


Sign in to add a comment