Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
netvs-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scc-net
netvs
netvs-core
Commits
0920c7dc
Commit
0920c7dc
authored
Nov 18, 2020
by
Robert
👽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: GlobalSearch scroll follows keyboard selection
arrow keys + tab
parent
62b54b00
Pipeline
#118612
passed with stages
in 8 minutes and 2 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
frontend/src/components/GlobalSearch.vue
frontend/src/components/GlobalSearch.vue
+11
-0
No files found.
frontend/src/components/GlobalSearch.vue
View file @
0920c7dc
...
...
@@ -25,12 +25,14 @@
</transition>
<b-popover
custom-class=
"popover-wide suggestions-popover shadow"
:show=
"(search_has_focus) || searching !== 0"
id=
"suggestions-popover"
target=
"search"
placement=
"bottom"
>
<div
class=
"suggestions-wrapper"
>
<div
v-if=
"getSearchDiscriminator()"
class=
"text-center suggestion p-3"
><i>
Globale Suche
in
</i><b>
{{
getSearchDiscriminator
()
}}
</b></div>
<div
v-for=
"(suggestion, index) in suggestions"
:key=
"'search-suggestion-' + index"
:id=
"'search-suggestion-' + index"
class=
"suggestion p-3"
:class=
"index === keyboard_focus ? 'keyboard-focus':''"
@
click=
"suggestionClicked($event, suggestion)"
>
...
...
@@ -393,6 +395,15 @@ export default {
if
(
this
.
suggestions
.
length
>
0
)
{
this
.
keyboard_focus
+=
down
?
1
:
-
1
this
.
keyboard_focus
=
Math
.
min
(
Math
.
max
(
this
.
keyboard_focus
,
-
1
),
this
.
suggestions
.
length
-
1
)
if
(
this
.
keyboard_focus
!==
-
1
)
{
const
popover
=
document
.
getElementById
(
'
suggestions-popover
'
)
const
suggestion
=
document
.
getElementById
(
'
search-suggestion-
'
+
this
.
keyboard_focus
)
if
(
popover
.
scrollTop
>
suggestion
.
offsetTop
)
{
popover
.
scrollTop
=
suggestion
.
offsetTop
}
else
if
(
popover
.
scrollTop
+
popover
.
clientHeight
<
suggestion
.
offsetTop
+
suggestion
.
clientHeight
)
{
popover
.
scrollTop
=
suggestion
.
offsetTop
+
suggestion
.
clientHeight
-
popover
.
clientHeight
}
}
}
},
searchKeyboardTab
(
e
)
{
...
...
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