Skip to content

[Bug Report] VMenu wrong alignment with RTL on #12195

@debuglore

Description

@debuglore

Environment

Vuetify Version: 2.3.10
Vue Version: 2.6.12
Browsers: Chrome 84.0.4147.135
OS: Linux x86_64

Steps to reproduce

  • use VMenu with a button activator or any other activator (especially containing long items)
  • setting $vuetify.rtl to true

Expected Behavior

the start (right in RTL) edge of the menu should be aligned along with the activator start edge, like LTR behavior, see MENU#2 in reproduction link

Actual Behavior

the end (left) edge of the menu aligned with the end edge of the activator

Reproduction Link

https://codepen.io/AbdulhamidZoubi/pen/yLOvbLb

Other comments

as a workaround, using the left prop on VMenu when vuetify.rtl is true solves the issue. but it is ridiculous to include this line on every menu in the application

I'm don't have enough knowledge and I'm not sure, but I think these lines in "VMenu.ts" can be updated to account for RTL

...
calculatedLeft (): string {
      const menuWidth = Math.max(this.dimensions.content.width, 
      parseFloat(this.calculatedMinWidth))

      if (!this.auto) return this.calcLeft(menuWidth) || '0'

      return convertToUnit(this.calcXOverflow(this.calcLeftAuto(), menuWidth)) || '0'
    },
...

Metadata

Metadata

Assignees

Labels

C: VMenuT: bugFunctionality that does not work as intended/expectedrtl

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions