buefy icon indicating copy to clipboard operation
buefy copied to clipboard

B-Sidebar close when clicking on content added after mount

Open OrestHk opened this issue 4 years ago • 1 comments

Overview of the problem

Buefy version: 0.9.19 Vuejs version: 2.6.14 OS/Browser: Chrome / Firefox - Windows

Description

When using b-sidebar component with dynamic content, the sidebar closes when you click on an item added after mount. Take for exemple a sidebar openning with static content, and content that is added after an API call, clicking on the static content won't close the sidebar, but clicking of the content added after the API call will close it.

Steps to reproduce

See here for reproduction: https://codesandbox.io/s/b-sidebar-buefy-w9dmh4?file=/src/components/HelloWorld.vue

  1. Click on "Open modal"
  2. Wait for the content to "load" (sometimes the content is already displayed 🤷, refresh the codesandbox browser page in that case)
  3. Click inside the sidebar outside of the red box
  4. Sidebar is not closing (wich is good)
  5. Click inside the red box
  6. Sidebar will close

Expected behavior

Sidebar should not close, when clicking inside it

Actual behavior

Sidebar is closing

As I understand it, this is due to the implementation of the whiteList on beforeUpdate in the sidebar component. It's watching for sidebar component update, but not what can happen inside the component

OrestHk avatar Mar 14 '22 15:03 OrestHk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 02:09 stale[bot]