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

SideBar p-sidebar-mask div is not removed automatically #329

Closed
canbax opened this issue May 22, 2020 · 9 comments
Closed

SideBar p-sidebar-mask div is not removed automatically #329

canbax opened this issue May 22, 2020 · 9 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@canbax
Copy link

canbax commented May 22, 2020

I'm a bit new to VueJs, so I don't know if it is on me but my case is very simple.

I'm using SideBar.

Code for my template is below.

<template>
  <div >
    <div>
      My App
      <Sidebar :visible.sync="visibleLeft">Content</Sidebar>
      <Button icon="pi pi-arrow-right" @click="visibleLeft = !visibleLeft" />
    </div>
    <div>asd asd ada sdasd</div>
  </div>
</template>

You can see that the mask (a div element with class p-sidebar-mask) is added to DOM but it is not removed

LJbuBgKNqH

@cagataycivici
Copy link
Member

What is your PrimeVue version?

@canbax
Copy link
Author

canbax commented May 27, 2020

it was "primevue": "^2.0.0-beta.1" it magically starts working. Maybe restarting computer helped.

@tiedeio
Copy link

tiedeio commented Jun 23, 2020

I have the same Problem and a restart doesn't fixed it. My PrimeVue Version is: "version": "2.0.0-rc.1",

@cagataycivici
Copy link
Member

cagataycivici commented Jul 3, 2020

Are you able to replicate it at live demo?

https://primefaces.org/primevue/showcase/#/sidebar

That would help.

@cagataycivici cagataycivici added the Resolution: Cannot Replicate Issue could not be replicated by Core Team label Jul 4, 2020
@tiedeio
Copy link

tiedeio commented Jul 7, 2020

I just get the bug if I use primevue over the script-tags. If I used it via the import mechanism (recommend) it works as expected. This ticket can be closed.

@Merve7 Merve7 self-assigned this Jul 24, 2020
@Merve7 Merve7 added this to the 2.0.5 milestone Jul 24, 2020
@Merve7 Merve7 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jul 24, 2020
@Merve7 Merve7 closed this as completed in 81c9602 Jul 24, 2020
@craigrileyuk
Copy link

I'm getting this issue now too:

    "devDependencies": {
        "@vue/compiler-sfc": "^3.0.5",
        "laravel-mix": "^6.0.10",
        "postcss": "^8.2.4",
        "resolve-url-loader": "^3.1.0",
        "sass": "^1.32.4",
        "sass-loader": "^8.0.2",
        "vue": "^3.0.5",
        "vue-loader": "^16.1.2"
    },
    "dependencies": {
        "laravel-mix-alias": "^1.0.2",
        "mqpacker": "^7.0.0",
        "primeicons": "^4.1.0",
        "primevue": "^3.1.2"
    }

It seems to be related to the disableModality method inside the Sidebar component. The callback to remove the mask is attached to an event listener for transitionend on the mask element. However, while the mask fires a transitionend event when it opens (for the transform property), on my project, it doesn't fire one when it's closed, therefore the callback to remove the mask is never executed.

<template>
      <PrimeSidebar v-model:visible="navigation.showSidebar">
          Content
      </PrimeSidebar>
  </template>
  
  <script>
  import PrimeSidebar from "primevue/sidebar";
  import navigation from "@/store/navigation";
  
  export default {
      setup() {
          return {
              PrimeSidebar,
              navigation,
          };
      },
  };
  </script>

/*
* store/navigation.js
*/

import { reactive } from "vue";

export default reactive({
  showSidebar: false,
});

@Aterr
Copy link

Aterr commented Nov 18, 2021

Was this fixed ?
I have the same issue with 3.8.2

@zeamedia
Copy link

zeamedia commented Feb 17, 2022

I have still the same error using primevue 3.7.2
It seams the issue is not fixed.
Now I had a look at all linked issues: adding some css classes fix it at mentioned here: #1541 (comment)

@cbutler90
Copy link

Having same issue, on same version as mentioned by zeamedia. Added CSS classes to fix for now, but this should be resolved at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

8 participants