mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 22:17:29 +02:00
closes #1642
This commit is contained in:
@@ -10,13 +10,15 @@ $(document).ready(function() {
|
||||
rootUrl = location.protocol + '//' + (location.hostname || location.host) + (location.port ? ':' + location.port : ''),
|
||||
apiXHR = null;
|
||||
|
||||
window.onpopstate = function (event) {
|
||||
if (event !== null && event.state && event.state.url !== undefined) {
|
||||
ajaxify.go(event.state.url, function() {
|
||||
$(window).trigger('action:popstate', {url: event.state.url});
|
||||
$(window).on('popstate', function (ev) {
|
||||
ev = ev.originalEvent;
|
||||
|
||||
if (ev !== null && ev.state && ev.state.url !== undefined) {
|
||||
ajaxify.go(ev.state.url, function() {
|
||||
$(window).trigger('action:popstate', {url: ev.state.url});
|
||||
}, true);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
ajaxify.currentPage = null;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ define('composer', [
|
||||
|
||||
$(window).off('resize', onWindowResize).on('resize', onWindowResize);
|
||||
|
||||
$(window).on('action:popstate', function(ev, data) {
|
||||
$(window).on('popstate', function(ev, data) {
|
||||
var env = utils.findBootstrapEnvironment();
|
||||
|
||||
if (composer.active && (env === 'xs' || env ==='sm')) {
|
||||
@@ -95,6 +95,11 @@ define('composer', [
|
||||
composer.posts[uuid] = post;
|
||||
|
||||
composer.load(uuid);
|
||||
|
||||
var env = utils.findBootstrapEnvironment();
|
||||
if (env === 'xs' || env ==='sm') {
|
||||
history.pushState({}, '', '#compose');
|
||||
}
|
||||
}
|
||||
|
||||
function composerAlert(message) {
|
||||
|
||||
Reference in New Issue
Block a user