-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
routed links must descend from pushstate root #652
Conversation
What is the issue exactly? I'm not sure what your test code does because it's only logging things and I don't know where the fail assertion should be. Given your description:
Are you saying that if I have: can.route.bindings.pushstate.root = "/bitovi/src/app/"; and a link like:
When that link is clicked on, it will call If yes, that is certainly a bug. |
Yes, exactly. I have a fix for it, though. And an additional fix will also avoid the issue I was having which led me to write #644. I've edited my original post above. |
I am never using issue/PR numbers in a commit message ever again. |
Why? They are very useful. |
When we do a |
// window.routeTestReady gets called again | ||
} | ||
// if routed | ||
timeout = setTimeout( function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs .stop()
and .start()
or .asyncTest
for asynchronous tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scratch that. Looks good.
@justinbmeyer Can you sanity check this? Looks good to merge to me but I haven't worked with the pushstate implementation a lot. |
routed links must descend from pushstate root
Fixing the test for pushstate #652
@andykant where did you get on fixing this? This is breaking minor. |
Rewrote the pushstate #652 test for stability purposes
The link wasn’t properly checking ev.isDefaultPrevented()
Caused issues with YUI in Firefox
Fixed the pushstate #652 test to ensure that it should pass in all libraries and phantomjs
This test is still breaking for me in firefox. |
If we have:
and a link like:
When that link is clicked on, it will call
ev.preventDefault()
and do apushState()
instead of letting the link behave normally.Additionally, if we have the same
root
listed above and:can.route.deparam
treats "/bitovi/src/app/" (theroot
) as part of the route when it shouldn't.