window.history issues after history.replaceState
Reported by
kenneth....@gmail.com,
Apr 1 2016
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2687.0 Safari/537.36 Example URL: https://webnfc-shoppingcart.appspot.com/#!/home Steps to reproduce the problem: This requires you to open the URL above and open a dialog (click on the FAB-button), and then navigate back and forward as well as dismiss (click outside overlay dialog) the dialog. All this works fine in Firefox. [] represents history state u = undefined d = stores dialog id load site [u] // no dialog open ^ open dialog [u][d] // dialog open (pushes entry) ^ back [u][d] // dialog closes ^ fwd [u][d] // dialog opens ^ dismiss [u][u] // replaces history state ^ open dialog [u][u][d] // open (pushes entry) ^ -- continue below -- EXPECTED/FIREFOX: back [u][u][d] // closes ^ fwd [u][u][d] // opens ^ ACTUAL/CHROME: back [u][d][u] // opens ^ fwd [u][d][u] // closes ^ The code handling the navigation is here: https://github.com/01org/webnfc-shoppingcart-demo/commit/176f532cc2c3adbef99c99ea5890fac8ff2f6cc3 What is the expected behavior? EXPECTED/FIREFOX: back [u][u][d] // closes ^ fwd [u][u][d] // opens ^ What went wrong? ACTUAL/CHROME: back [u][d][u] // opens ^ fwd [u][d][u] // closes Does it occur on multiple sites: No Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 51.0.2687.0 Channel: dev OS Version: Flash Version:
,
Apr 6 2016
,
Apr 6 2016
I've done some work on replaceState recently, so I can probably take a look next week. (No time before then.) Avi and Nate may also be familiar with this area.
,
Apr 7 2016
+cc toyoshim fyi
,
Apr 8 2016
I am having trouble following your reproduction steps.
load site [u] // no dialog open
^
open dialog [u][d] // dialog open (pushes entry)
^
back [u][d] // dialog closes
^
When I click the FAB on your second step, I see the new entry in the history list, and I see the dialog open, but I don't see a URL change. When I click "back" for the third step, again, I see no change in the URL, but I also don't see the dialog close.
I tried in Chrome 51.0.2679.0 dev channel as well as Firefox 45.0.1.
Can you clarify the steps? Am I missing something?
,
Apr 11 2016
,
Apr 11 2016
I see this behavior with dev now as well, so broken in another way. I just tested with Firefox (45) and it works as expected. Yes, the URL doesn't change, that is fine. I can push a history item and modify data without changing the URL itself. If you (in dev) after pressing back (when the dialog doesnt close anymore), click outside the dialog (manually close it) then press forward and it actually reopens.
,
Apr 11 2016
It should be closing on back now, a JS error was being triggered which I haven't run into before.
,
Apr 11 2016
OK, this is functioning for me. It actually works as expected on 52.0.2705.0 canary as well as 51.0.2700.0 dev. Can you confirm which version of Chrome aren't working?
,
Apr 12 2016
Thank you for providing more feedback. Adding requester "bmcquade@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 12 2016
,
Apr 13 2016
OK, now this works for me as well, I'm confused.
,
Apr 13 2016
I also see that my chrome was upgraded to Version 51.0.2700.0 dev (64-bit) so it might have been fixed in that version.
,
Apr 13 2016
Thank you for providing more feedback. Adding requester "bmcquade@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 13 2016
Thanks! I'll close this out for now. Please re-open if you encounter the issue again.
,
Apr 13 2016
Kenneth: Weird, yeah. Thanks for bringing it to our attention, though. Always happy to help fix nav issues.
,
Apr 13 2016
(changing bug owner to avi since I didn't actually do the debugging. thanks avi for taking a look at this!) |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by dtapu...@chromium.org
, Apr 1 2016