Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3296517

Browse filesBrowse files
committed
fix: CSidebar - fix checking if user clicked on sidebar nav link
1 parent 8228f2e commit 3296517
Copy full SHA for 3296517

File tree

Expand file treeCollapse file tree

1 file changed

+2
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-7
lines changed

‎src/components/sidebar/CSidebar.vue

Copy file name to clipboardExpand all lines: src/components/sidebar/CSidebar.vue
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,8 @@ export default {
111111
},
112112
methods: {
113113
sidebarClick (e) {
114-
const hiddingElementClicked = e.target.className.includes('c-sidebar-nav-link')
115-
if (
116-
hiddingElementClicked &&
117-
this.hideOnMobileClick &&
118-
this.isOnMobile()
119-
) {
120-
this.closeSidebar()
114+
if (this.hideOnMobileClick && this.isOnMobile()) {
115+
e.target.closest('a.c-sidebar-nav-link') ? this.closeSidebar() : null
121116
}
122117
},
123118
closeSidebar () {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.