Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonathan Wilkes
purr-data
Commits
c92742b7
Commit
c92742b7
authored
Apr 26, 2021
by
Prakhar Agarwal
🎯
Browse files
search match gets scrolled into view
parent
6e7b9aaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
emscripten/project/purr-data/utils/console_find.js
View file @
c92742b7
...
...
@@ -116,7 +116,6 @@ var console_find_traverse = (function () {
}
// adjust the scrollbar to make sure the element is visible,
// but only if necessary.
// I don't think this is available on all browsers...
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// checks if browser is Firefox or not
if
(
isFirefox
)
{
elements
[
i
].
scrollIntoView
();
...
...
@@ -145,7 +144,6 @@ var console_find_traverse = (function () {
}
// adjust the scrollbar to make sure the element is visible,
// but only if necessary.
// I don't think this is available on all browsers...
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// checks if browser is Firefox or not
if
(
isFirefox
)
{
elements
[
i
].
scrollIntoView
();
...
...
@@ -162,6 +160,14 @@ var console_find_traverse = (function () {
if
(
elements
.
length
>
0
)
{
elements
[
0
].
classList
.
add
(
"
console_find_current
"
);
}
// adjust the scrollbar to make sure the element is visible,
// but only if necessary.
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// checks ifbrowser is Firefox or not
if
(
isFirefox
)
{
elements
[
0
].
scrollIntoView
();
}
else
{
elements
[
0
].
scrollIntoViewIfNeeded
();
}
}
};
}());
...
...
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