From 1602858b2662111ac55249422080eab274cc8f30 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 20 Apr 2015 16:41:19 -0700 Subject: [PATCH] Possible fix for JX.History spookiness? Summary: Ref T7573. I only got this reproducing like 10% of the time in Firefox but I can't reproduce it anymore after this change. Test Plan: - Added some logging. - Saw Firefox handing us nonsense state values (?) - Read the Firefox documentation? - Maybe state is expected to be an object? This shouldn't matter? - I don't really know? iiam Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7573 Differential Revision: https://secure.phabricator.com/D12485 --- resources/celerity/map.php | 10 +++++----- webroot/rsrc/externals/javelin/lib/Quicksand.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 2ffed295d6..30d6e9f734 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -205,7 +205,7 @@ return array( 'rsrc/externals/javelin/lib/JSON.js' => '69adf288', 'rsrc/externals/javelin/lib/Leader.js' => '331b1611', 'rsrc/externals/javelin/lib/Mask.js' => '8a41885b', - 'rsrc/externals/javelin/lib/Quicksand.js' => 'd15f0293', + 'rsrc/externals/javelin/lib/Quicksand.js' => '8750a840', 'rsrc/externals/javelin/lib/Request.js' => '94b750d2', 'rsrc/externals/javelin/lib/Resource.js' => '44959b73', 'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692', @@ -677,7 +677,7 @@ return array( 'javelin-leader' => '331b1611', 'javelin-magical-init' => '3010e992', 'javelin-mask' => '8a41885b', - 'javelin-quicksand' => 'd15f0293', + 'javelin-quicksand' => '8750a840', 'javelin-reactor' => '2b8de964', 'javelin-reactor-dom' => 'c90a04fc', 'javelin-reactor-node-calmer' => '76f4ebed', @@ -1482,6 +1482,9 @@ return array( 'aphront-typeahead-control-css', 'phui-tag-view-css', ), + '8750a840' => array( + 'javelin-install', + ), '87cb6b51' => array( 'javelin-behavior', 'javelin-dom', @@ -1793,9 +1796,6 @@ return array( 'javelin-stratcom', 'phabricator-phtize', ), - 'd15f0293' => array( - 'javelin-install', - ), 'd19198c8' => array( 'javelin-install', 'javelin-dom', diff --git a/webroot/rsrc/externals/javelin/lib/Quicksand.js b/webroot/rsrc/externals/javelin/lib/Quicksand.js index ca045504d7..e989b2c14b 100644 --- a/webroot/rsrc/externals/javelin/lib/Quicksand.js +++ b/webroot/rsrc/externals/javelin/lib/Quicksand.js @@ -151,7 +151,7 @@ JX.install('Quicksand', { var id = ++self._id; self._history.push({path: path, id: id}); - JX.History.push(path, id); + JX.History.push(path, {quicksand: id}); self._cursor = (self._history.length - 1); self._responses[id] = null; @@ -256,7 +256,7 @@ JX.install('Quicksand', { var self = JX.Quicksand; var data = e.getData(); - data.state = data.state || null; + data.state = (data.state && data.state.quicksand) || null; // Check if we're going back to the first page we started Quicksand on. // We don't have a state value, but can look at the path.