mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 14:35:18 -04:00
Reset scroll position on location change.
This commit is contained in:
parent
9da65f9fc7
commit
d032babf1a
2 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@ modulejs.define('core/settings', ['config', '_'], function (config, _) {
|
||||||
|
|
||||||
return _.extend({}, config.options, {
|
return _.extend({}, config.options, {
|
||||||
appHref: config.setup.APP_URL,
|
appHref: config.setup.APP_URL,
|
||||||
rootHref: config.setup.ROOT_URL
|
rootHref: config.setup.ROOT_URL,
|
||||||
|
currentHref: config.setup.CURRENT_URL
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -112,6 +112,8 @@ modulejs.define('view/items', ['_', '$', 'core/settings', 'core/resource', 'core
|
||||||
} else {
|
} else {
|
||||||
$empty.hide();
|
$empty.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('html,body').scrollLeft(0).scrollTop(0);
|
||||||
},
|
},
|
||||||
|
|
||||||
onLocationRefreshed = function (item, added, removed) {
|
onLocationRefreshed = function (item, added, removed) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue