Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
e79e591f
Unverified
Commit
e79e591f
authored
Dec 17, 2021
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle scroll to header in tabset hidden tab
parent
5d3e8149
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tabset.vue
client/themes/default/components/tabset.vue
+15
-0
No files found.
client/themes/default/components/tabset.vue
View file @
e79e591f
...
...
@@ -37,7 +37,22 @@ export default {
}
},
mounted
()
{
// Handle scroll to header on load within hidden tab content
if
(
window
.
location
.
hash
&&
window
.
location
.
hash
.
length
>
1
)
{
const
headerId
=
decodeURIComponent
(
window
.
location
.
hash
)
let
foundIdx
=
-
1
this
.
$refs
.
content
.
childNodes
.
forEach
((
node
,
idx
)
=>
{
if
(
node
.
querySelector
(
headerId
))
{
foundIdx
=
idx
}
})
if
(
foundIdx
>=
0
)
{
this
.
currentTab
=
foundIdx
}
}
this
.
setActiveTab
()
this
.
$refs
.
tabs
.
childNodes
.
forEach
((
node
,
idx
)
=>
{
node
.
addEventListener
(
'click'
,
ev
=>
{
this
.
currentTab
=
[].
indexOf
.
call
(
ev
.
target
.
parentNode
.
children
,
ev
.
target
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment