Skip to content

click outside to close sidebar#2272

Merged
juliusknorr merged 4 commits intomasterfrom
enh/clickOutsideToCloseSidebar
Nov 3, 2022
Merged

click outside to close sidebar#2272
juliusknorr merged 4 commits intomasterfrom
enh/clickOutsideToCloseSidebar

Conversation

@jakobroehrl
Copy link
Copy Markdown
Contributor

Signed-off-by: Jakob Röhrl jakob.roehrl@web.de

With this change the sidebar no longer opens at all.
@juliushaertl do you have an idea how to solve it?

Copy link
Copy Markdown
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work that easy, as this basically blocks the sidebar from being opened in the first run when clicking on a card.

@jakobroehrl jakobroehrl closed this Sep 9, 2020
@jakobroehrl
Copy link
Copy Markdown
Contributor Author

@juliushaertl How to do this?
Would it be easier to implement closing with the esc key?

@jakobroehrl jakobroehrl reopened this Sep 24, 2020
@juliusknorr
Copy link
Copy Markdown
Member

Well escape key should probably also work but the click would be still useful. To make this work you would basically need to make sure that the click was triggered on the board dom element and not on a card in the v-click-outside handler.

@jakobroehrl
Copy link
Copy Markdown
Contributor Author

It doesn't work with that either: Sidebar no longer opens

<div id="app-content" @click="clickCloseSidebar()">

@juliusknorr juliusknorr added this to the 💥 1.2.0 milestone Oct 2, 2020
@juliusknorr juliusknorr modified the milestones: 1.2.0, 1.3.0 Nov 10, 2020
@juliusknorr juliusknorr removed this from the 1.3.0 milestone Dec 29, 2020
jakobroehrl and others added 3 commits November 3, 2022 15:06
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the enh/clickOutsideToCloseSidebar branch from 5e3661c to 7a23f3b Compare November 3, 2022 17:19
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
Copy link
Copy Markdown
Member

To make this work you would basically need to make sure that the click was triggered on the board dom element and not on a card in the v-click-outside handler.

Fixed by using @juliushaertl's approach :)

@juliusknorr juliusknorr merged commit b648947 into master Nov 3, 2022
@juliusknorr juliusknorr deleted the enh/clickOutsideToCloseSidebar branch November 3, 2022 19:10
@juliusknorr
Copy link
Copy Markdown
Member

Seems to have caused a regression when trying to open the board sidebar as that click opens the sidebar but closes it directly again. Maybe we should only trigger it when clicking the board content area somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Click outside card should close sidebar

3 participants