Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Issue with relative path including parent folder #65

Closed
nhoizey opened this issue May 27, 2015 · 3 comments · Fixed by #68
Closed

Issue with relative path including parent folder #65

nhoizey opened this issue May 27, 2015 · 3 comments · Fixed by #68

Comments

@nhoizey
Copy link
Contributor

nhoizey commented May 27, 2015

If the CSS href begins with ../, the indexOf test never returns true, the media attribute keeps the only x value, and the setTimeout goes indefinitely.

This is because the browser translates the relative path to an absolute one, that doesn't contain the ../ part anymore.

@nhoizey
Copy link
Contributor Author

nhoizey commented May 27, 2015

Ok, I just saw there's already a pull request for that: #52

scottjehl added a commit that referenced this issue May 28, 2015
@scottjehl
Copy link
Member

I think the proposed fix in 1f97ab0 will be a bit more reliable. Thoughts?

@nhoizey
Copy link
Contributor Author

nhoizey commented May 28, 2015

I think so indeed!

scottjehl added a commit that referenced this issue May 28, 2015
add test harness with 2 passing tests (cherry-picking from commit a66b1fb)
unit test: cssom increments by 1 (cherry-picking from commit f7f6943)
typo (cherry-picking from commit 444eb0a)
unit test: stylesheet successfully loaded (cherry-picking from commit b07aeb1)
add passing tests for all other api features including relative paths (cherry-picking from commit 1e8393d)
test relative paths better, without onload, so it compares paths (cherry-picking from commit b06476d)
add test harness with 2 passing tests (cherry-picking from commit a66b1fb)
unit test: cssom increments by 1 (cherry-picking from commit f7f6943)
typo (cherry-picking from commit 444eb0a)
unit test: stylesheet successfully loaded (cherry-picking from commit b07aeb1)
add passing tests for all other api features including relative paths (cherry-picking from commit 1e8393d)
test relative paths better, without onload, so it compares paths (cherry-picking from commit b06476d)
add test harness with 2 passing tests (cherry-picking from commit a66b1fb)
unit test: cssom increments by 1 (cherry-picking from commit f7f6943)
typo (cherry-picking from commit 444eb0a)
unit test: stylesheet successfully loaded (cherry-picking from commit b07aeb1)
add passing tests for all other api features including relative paths (cherry-picking from commit 1e8393d)
test relative paths better, without onload, so it compares paths (cherry-picking from commit b06476d)
scottjehl added a commit that referenced this issue May 28, 2015
zachleat added a commit that referenced this issue Jun 1, 2015
allow relative paths to work. fixes #65
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants