Contenteditable with plaintext-only shows broken writing direction option |
||
Issue descriptionWhat 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.
,
May 28 2018
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 |
||
Comment 1 by l...@chromium.org
, May 22 2018