Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VOverlay): position on LTR/RTL after locale switch #17338

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Mostafa-Shalaby
Copy link
Contributor

Description

close #17314

  • The issue affect the overlay, such as tooltips, menus, etc...
  • The issue is very specific, when switching locale, after opening a overlay (The overlay would still have a left or right attribute) thus cause it to not be displayed correctly after switching the language.
  • A refresh fixes the issue, since the overlay no longer would have a right or left attribute in its styling.
  • This should fix the issue without calling a second updatelocation call

Markup:

<template>
  <v-app>
    <v-container>
      <v-locale-provider :locale="toggle ? 'ar' : 'en'">
        <v-switch v-model="toggle" label="Toggle Locale" />
        <v-main style="margin-top: 100px;">
          {{ toggle ? 'RTL:' : 'LTR:' }}
          <VTooltip text="Tooltip" location="top">
            <template #activator="{ props }">
              <VBtn class="mx-3" v-bind="props">Tooltip</VBtn>
            </template>
          </VTooltip>
          <VTooltip text="Tooltip" location="bottom">
            <template #activator="{ props }">
              <VBtn class="mx-3" v-bind="props">Tooltip</VBtn>
            </template>
          </VTooltip>
          <VTooltip class="mx-3" text="Tooltip" location="start">
            <template #activator="{ props }">
              <VBtn class="mx-3" v-bind="props">Tooltip</VBtn>
            </template>
          </VTooltip>
          <VTooltip class="mx-3" text="Tooltip" location="end">
            <template #activator="{ props }">
              <VBtn class="mx-3" v-bind="props">Tooltip</VBtn>
            </template>
          </VTooltip>
          <VBtn class="mx-3" color="primary">
            Open Menu
            <VMenu activator="parent">
              <VList>
                <VListItem>Item 1</VListItem>
                <VListItem>Item 2</VListItem>
                <VListItem>Item 3</VListItem>
                <VListItem>Item 4</VListItem>
              </VList>
            </VMenu>
          </VBtn>
        </v-main>
      </v-locale-provider>
    </v-container>
  </v-app>
</template>

<script>
 /* */
  export default {
    name: 'Playground',
    setup () {
      return {
      }
    },
    data () {
      return {
        toggle: false,
      }
    },
  }
</script>

@Mostafa-Shalaby Mostafa-Shalaby changed the title fix(VOverlay): position on RTL after locale switch fix(VOverlay): position on LTR/RTL after locale switch May 10, 2023
@KaelWD KaelWD force-pushed the master branch 12 times, most recently from 7c417af to 070e2aa Compare May 24, 2023 13:23
@johnleider johnleider requested a review from KaelWD July 12, 2023 13:38
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VOverlay VOverlay labels Jul 18, 2023
@johnleider johnleider added this to the v3.3.x milestone Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOverlay VOverlay T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.2.2] VMenu position incorrect the first time after switching to or from RTL
2 participants