Skip to content

Little fix#2

Open
hyperkun wants to merge 2 commits intojzaefferer:masterfrom
hyperkun:master
Open

Little fix#2
hyperkun wants to merge 2 commits intojzaefferer:masterfrom
hyperkun:master

Conversation

@hyperkun
Copy link

Hello, I've noticed that, due to workaround made for compatibility with Webkit browsers, in Firefox your library ignores first "onpopstate" event, so user is not able to go to the first history state. Here's my suggested fix - use that workaround only when user agent is a Webkit browser.

@jzaefferer
Copy link
Owner

There's an issue in Firefox, I can agree with that. Though the suggested fix is not good enough. We need a feature test of some kind, instead of just sniffing the useragent.

@hyperkun
Copy link
Author

Well, I can't imagine how this feature detection may work. But I'm sure that if this test ever be implemented, it will overcomplicate things, and "Simple History" will stop being simple :)

@jzaefferer
Copy link
Owner

You're probably right about that.

I need to do some research on the current state of things. Its silly that one browser would trigger the event on page load, the others don't, and then they just stick with that.

@jzaefferer
Copy link
Owner

My attempt at getting this fixed on the spec level: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18405

Could take several months though until it gets the editor's (hixie) attention.

@hyperkun
Copy link
Author

hyperkun commented Aug 3, 2012

That's great! But still, it means that your library will be unusable for that months (or even for years, until browser developers adopt this spec).

@jzaefferer
Copy link
Owner

Yeah, I need to check out your patch again, I don't really want to wait. A solution without UA-sniffing would be so much nicer...

@balupton
Copy link

Here is the complete listing of issues I've found between browsers while developing History.js: https://github.com/balupton/history.js/wiki/The-State-of-the-HTML5-History-API

Getting this stuff fixed browser side is ideal, so I commend that effort and would happily take part in it if you'd like. Until then, the only way I know of that brings complete compatibility between all browsers is History.js because every browser does behave differently (at one point or the other).

@jzaefferer
Copy link
Owner

So according to your chart, its just Chrome that fires the initial popstate event, but no other browser does it. I wonder what MS does in IE10 though.

@jzaefferer
Copy link
Owner

Btw. my bug report got closed as a duplicate, but the "original" got "RESOLVED FIXED". I don't understand how that addresses my issue, but I hope UA developers do: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18605

I need to find or create a WebKit/Chromium issue to the buggy Chrome behaviour, since that spec fix should clarify the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments