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) {
|
if (app.ports !== undefined && app.ports.registerVideo !== undefined) {
|
||||||
app.ports.registerVideo.subscribe(function(args) {
|
app.ports.registerVideo.subscribe(function(args) {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
var time = parseInt(args[2], 10) || undefined;
|
var time = parseInt(args[2], 10) || undefined;
|
||||||
|
|
||||||
requestAnimationFrame(function() {
|
requestAnimationFrame(function() {
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
|
|
||||||
if (app.ports !== undefined && app.ports.eraseVideo !== undefined) {
|
if (app.ports !== undefined && app.ports.eraseVideo !== undefined) {
|
||||||
app.ports.eraseVideo.subscribe(function() {
|
app.ports.eraseVideo.subscribe(function() {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
lastId = undefined;
|
lastId = undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue