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 closes when click on dynamic content #2998

Closed
petlun opened this issue Oct 23, 2020 · 8 comments
Closed

Sidebar closes when click on dynamic content #2998

petlun opened this issue Oct 23, 2020 · 8 comments
Assignees
Labels

Comments

@petlun
Copy link

petlun commented Oct 23, 2020

Overview of the problem

Click on sidebars dynamic content closes the sidebar

Buefy version: [0.9.3]
Vuejs version: [2.6.12]
OS/Browser: Windows 10/Chrome 86.0.4240.111

Description

The sidebar closes when click on dynamic content.

Steps to reproduce

https://codepen.io/petlun/pen/MWeJWzb
Click on "Show", then click the button "Show more" twice.
Click on item 10.

Expected behavior

The sidebar remains open.

Actual behavior

The sidebar closes.

@jtommy jtommy self-assigned this Oct 23, 2020
@jtommy jtommy added the bug label Oct 23, 2020
@petlun
Copy link
Author

petlun commented Oct 23, 2020

I suspect it could be related to https://github.com/buefy/buefy/blob/dev/src/components/sidebar/Sidebar.vue#L126
The Document method querySelectorAll() returns a static (not live) NodeList

@jtommy
Copy link
Member

jtommy commented Oct 23, 2020

@petlun it has been fixed #2853. Available in the next release

@jtommy jtommy closed this as completed Oct 23, 2020
@michaelcaterisano
Copy link

I'm still having this issue. https://codepen.io/michaelcaterisano/pen/YzGQVaZ

Steps to reproduce:
Click "open sidebar" button. Sidebar opens.
Click item in sidebar to remove from list. When item is the last item of the array, sidebar fires "close" event.

@highoncarbs
Copy link

@michaelcaterisano @jtommy any update on this ? Same issue

@nikzanda
Copy link

+1, Same issue

@mirocklez
Copy link

Definitely Sidebar is still buggy when used this way, see #3052.
Probably this needs to be reopened again and issue be addressed @jtommy?

@jtommy jtommy reopened this Jan 31, 2022
@ldonis
Copy link

ldonis commented Feb 27, 2022

Same issue, it happens only when using v-if, workaround is use v-show instead (not really a solution)

@jtommy jtommy closed this as completed in 737f743 Mar 1, 2022
@jtommy
Copy link
Member

jtommy commented Mar 1, 2022

Just found a way, it's really tricky because it's relative to click listener queue but I added a way to check the element with the previous sidebar content 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants