Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
open-source
MetaGer
Commits
18b47b1d
Commit
18b47b1d
authored
Oct 16, 2019
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed input focus on result page
parent
c5c5c346
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
resources/js/keyboardNavigation.js
resources/js/keyboardNavigation.js
+6
-7
No files found.
resources/js/keyboardNavigation.js
View file @
18b47b1d
...
@@ -7,30 +7,29 @@ $(document).ready(function () {
...
@@ -7,30 +7,29 @@ $(document).ready(function () {
// Add entry point for tabbing to the first result
// Add entry point for tabbing to the first result
$
(
'
.result, .ad
'
).
first
().
attr
(
"
id
"
,
"
results-entry
"
);
$
(
'
.result, .ad
'
).
first
().
attr
(
"
id
"
,
"
results-entry
"
);
// Initially focus the searchbar
// Initially focus the searchbar
$
(
'
div.search-input input
'
).
focus
();
});
});
/**
/**
* Simulate a click on enter keypress when focused on labels
* Simulate a click on enter keypress when focused on labels
*/
*/
$
(
'
label
'
).
on
(
'
keydown
'
,
function
(
e
)
{
$
(
'
label
'
).
on
(
'
keydown
'
,
function
(
e
)
{
if
(
e
.
keyCode
==
'
13
'
)
{
if
(
e
.
keyCode
==
'
13
'
)
{
$
(
this
).
click
();
$
(
this
).
click
();
$
(
'
a
'
,
this
)
$
(
'
a
'
,
this
)
}
}
});
});
/**
/**
* Handles tab keypress and escape keypress
* Handles tab keypress and escape keypress
*/
*/
$
(
document
).
on
(
'
keydown
'
,
function
(
e
)
{
$
(
document
).
on
(
'
keydown
'
,
function
(
e
)
{
e
=
e
||
window
.
event
;
e
=
e
||
window
.
event
;
// On first tab keypress there is special behaviour and the ctrlInfo flag is set
// 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
();
focusNavBox
();
e
.
preventDefault
();
e
.
preventDefault
();
ctrlInfo
=
true
;
ctrlInfo
=
true
;
}
else
if
(
e
.
keyCode
==
'
27
'
)
{
}
else
if
(
e
.
keyCode
==
'
27
'
)
{
escKeyPressed
();
escKeyPressed
();
}
}
});
});
...
...
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