Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
18b47b1d
Commit
18b47b1d
authored
5 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
removed input focus on result page
parent
c5c5c346
No related branches found
Branches containing commit
No related tags found
2 merge requests
!1468
Development
,
!1467
Resolve "Avoid more of the Yahoo Filtering"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/js/keyboardNavigation.js
+6
-7
6 additions, 7 deletions
resources/js/keyboardNavigation.js
with
6 additions
and
7 deletions
resources/js/keyboardNavigation.js
+
6
−
7
View file @
18b47b1d
...
...
@@ -7,30 +7,29 @@ $(document).ready(function () {
// Add entry point for tabbing to the first result
$
(
'
.result, .ad
'
).
first
().
attr
(
"
id
"
,
"
results-entry
"
);
// Initially focus the searchbar
$
(
'
div.search-input input
'
).
focus
();
});
/**
* Simulate a click on enter keypress when focused on labels
*/
$
(
'
label
'
).
on
(
'
keydown
'
,
function
(
e
)
{
if
(
e
.
keyCode
==
'
13
'
)
{
$
(
'
label
'
).
on
(
'
keydown
'
,
function
(
e
)
{
if
(
e
.
keyCode
==
'
13
'
)
{
$
(
this
).
click
();
$
(
'
a
'
,
this
)
}
});
});
/**
* Handles tab keypress and escape keypress
*/
$
(
document
).
on
(
'
keydown
'
,
function
(
e
)
{
$
(
document
).
on
(
'
keydown
'
,
function
(
e
)
{
e
=
e
||
window
.
event
;
// On first tab keypress there is special behaviour and the ctrlInfo flag is set
if
(
!
ctrlInfo
&&
e
.
keyCode
==
'
9
'
)
{
if
(
!
ctrlInfo
&&
e
.
keyCode
==
'
9
'
)
{
focusNavBox
();
e
.
preventDefault
();
ctrlInfo
=
true
;
}
else
if
(
e
.
keyCode
==
'
27
'
)
{
}
else
if
(
e
.
keyCode
==
'
27
'
)
{
escKeyPressed
();
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment