Skip to content

Context menu not accessible in RTL mode #3607

@swissspidy

Description

@swissspidy

Bug Description

I'm splitting this out from #3012 as it seems to be a big enough task on its own.

It looks like our custom context menu (accessible via right click or keyboard shortcut) is not working when using the editor in RTL mode.

Expected Behaviour

The context menu should be accessible just like as in LTR mode.

Steps to reproduce

  1. Install RTL Tester plugin and click on "Switch to RTL" in the admin bar. Or, alternatively, switch user language to an RTL language like Arabic.
  2. Open stories editor
  3. Try to access context menu

Additional context

  • WordPress version: 5.4
  • Plugin version: develop
  • Gutenberg plugin version (if applicable): 6.7
  • AMP plugin template mode:
  • PHP version:
  • OS:
  • Browser: Chrome on macOS

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The context menu should be accessible in RTL mode just like as in LTR mode.

Implementation brief

  • Check if RTL mode is set and use right offset over left offset to workout position of position of popover.
  • Also make sure RTL css works correctly.

QA testing instructions

  1. Set mode to RTL
  2. Create a new story.
  3. Create new text block.
  4. Right click on text block.
  5. Verify context menu appeareance

Demo

https://youtu.be/4HEK_gFI1Zs

Changelog entry

  • Improved context menu RTL support

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingi18n

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions