Fix Navigate.popstate on Chrome

This commit is contained in:
Zixaphir 2014-01-10 23:14:02 -07:00
parent 865c5acfb6
commit 685f74de50
2 changed files with 12 additions and 7 deletions

View File

@ -12173,14 +12173,15 @@
}
},
popstate: function() {
return Navigate.popstate = function() {
$.off(window, 'popstate', Navigate.popstate);
return $.on(window, 'popstate', Navigate.popstate = function() {
var a;
a = $.el('a', {
href: window.location,
id: 'popState'
});
return Navigate.navigate.call(a);
};
});
},
refresh: function(context) {
var boardID, feature, name, threadID, view, _i, _len, _ref, _ref1;

View File

@ -290,12 +290,16 @@ Navigate =
Unread.read()
Unread.update()
popstate: -> <% if (type === 'crx') { %> Navigate.popstate = -> <% } %> # blink/webkit throw a popstate on page load. Not what we want.
a = $.el 'a',
href: window.location
id: 'popState'
popstate: -> <% if (type === 'crx') { %>
$.off window, 'popstate', Navigate.popstate
$.on window, 'popstate', Navigate.popstate = ->
<% } %> # blink/webkit throw a popstate on page load. Not what we want.
Navigate.navigate.call a
a = $.el 'a',
href: window.location
id: 'popState'
Navigate.navigate.call a
refresh: (context) ->
return