Suwon Chae 2015-02-23
fix: Workaround for pjax bug result from bfcache
This patch prevents using pjax when a user use firefox or safari
see more https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching
@b8f5c1e75c0814ee240f388ee11fd4290ee3d65b
public/javascripts/service/yobi.issue.List.js
--- public/javascripts/service/yobi.issue.List.js
+++ public/javascripts/service/yobi.issue.List.js
@@ -193,6 +193,13 @@
          * @private
          */
         function _initPjax(){
+            var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
+            var isSafari = navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1;
+            // Workaround for pjax bug result from bfcache
+            // https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching
+            if(isFirefox || isSafari){
+                return;
+            }
             var htPjaxOptions = {
                 "fragment": "div[pjax-container]",
                 "timeout" : 3000
Add a comment
List