sammy
sammy copied to clipboard
href="javascript:;" crash sammy under IE8
using: (https://github.com/quirkey/sammy/raw/master/examples/hello_world/index.html) with jquery: (http://code.jquery.com/jquery-1.5.1.min.js) sammy: (https://github.com/quirkey/sammy/raw/master/lib/sammy.js)
I've added break sammy
like: break sammy
sammy works fine until i click "break sammy" link. The hash changes on location bar but content doesn't change.
Working workaround: // fix sammy in IE if ($.browser.msie) { $("a[href='javascript:;']").livequery("click", function() { return false; }); }
Does the back button still work in this scenario? What if you change the URL back to #/test
by hand - does it update the onscreen text?
Back button wont work, hand change wont work to.
Hi guys,
I understand this is a browser issue (on of many of IE). But as I see it, you either accept this as a bug, or no longer claim sammyjs supports IE8 (at least not fully).
Cheers
Have you tested it @gabrys?
There are a lot of things that could be going on here and I havent had time to fully test yet. One - I havent tested Sammy + jQuery 1.5.1. Two - I havent tested this combination in IE yet. Three - What situation do you have that sort of link in a web application? Sammy will also stop working in any browser if you do <a href="javascript: Sammy().unload();">
but that doesn't mean Sammy doesn't support every major browser.
Not tested is not a reason to close the bug.
The easiest test case: http://www.wikidot.com/sammy.php
It's one of the examples from Sammy's repo with a bunch of links added. Easy to click and see which break Sammy's navigation and which don't.
Sorry, I did not mean to close the bug - annoying that Githubs comment and close button is the first, I always end up hitting it :/
I will get around to testing this but unsure what the actual issue is/where it lies. Does click that type of link break regular jQuery operations or any setInterval
?
Thank you for the clarification. jQuery stuff seems to work after clicking such link.. For example we're using .live('click', function()...) for some events and they do work even after Sammy breaks. I haven't check setInterval though.