firefox scroll persistence fix
This commit is contained in:
parent
667a4d4f03
commit
e85f817bac
|
@ -29,12 +29,12 @@
|
|||
|
||||
/* persist navigation scroll point */
|
||||
(function () {
|
||||
window.addEventListener('unload', function() {
|
||||
window.onunload = function () {
|
||||
var scrollPoint = document.getElementById('patterns-nav').scrollTop
|
||||
localStorage.setItem('scrollPoint', scrollPoint)
|
||||
})
|
||||
}
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('patterns-nav').scrollTop = parseInt(localStorage.getItem('scrollPoint'))
|
||||
})
|
||||
}());
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,12 +29,12 @@
|
|||
|
||||
/* persist navigation scroll point */
|
||||
(function () {
|
||||
window.addEventListener('unload', function() {
|
||||
window.onunload = function () {
|
||||
var scrollPoint = document.getElementById('patterns-nav').scrollTop
|
||||
localStorage.setItem('scrollPoint', scrollPoint)
|
||||
})
|
||||
}
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('patterns-nav').scrollTop = parseInt(localStorage.getItem('scrollPoint'))
|
||||
})
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue
Block a user