Scroll up on page change
This commit is contained in:
parent
707d4f45f1
commit
f22e1c576b
|
@ -21,6 +21,7 @@
|
|||
|
||||
if (app.ports !== undefined && app.ports.registerVideo !== undefined) {
|
||||
app.ports.registerVideo.subscribe(function(args) {
|
||||
window.scrollTo(0, 0);
|
||||
var time = parseInt(args[2], 10) || undefined;
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
|
@ -41,6 +42,7 @@
|
|||
|
||||
if (app.ports !== undefined && app.ports.eraseVideo !== undefined) {
|
||||
app.ports.eraseVideo.subscribe(function() {
|
||||
window.scrollTo(0, 0);
|
||||
lastId = undefined;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue