{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/884","repository_url":"https://api.github.com/repos/thoughtbot/capybara-webkit","labels_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/884/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/884/comments","events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/884/events","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/884","id":137897823,"number":884,"title":"javascript code inside rails view not running","user":{"login":"ristovskiv","id":8341607,"avatar_url":"https://avatars.githubusercontent.com/u/8341607?v=3","gravatar_id":"","url":"https://api.github.com/users/ristovskiv","html_url":"https://github.com/ristovskiv","followers_url":"https://api.github.com/users/ristovskiv/followers","following_url":"https://api.github.com/users/ristovskiv/following{/other_user}","gists_url":"https://api.github.com/users/ristovskiv/gists{/gist_id}","starred_url":"https://api.github.com/users/ristovskiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ristovskiv/subscriptions","organizations_url":"https://api.github.com/users/ristovskiv/orgs","repos_url":"https://api.github.com/users/ristovskiv/repos","events_url":"https://api.github.com/users/ristovskiv/events{/privacy}","received_events_url":"https://api.github.com/users/ristovskiv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-02T15:02:01Z","updated_at":"2016-03-03T15:54:41Z","closed_at":null,"body":"I have a javascript code in a rails view which runs depending on the URI of the page. For example if it has a fragment in the URI it changes it to query string.\r\n\r\n```\r\nif(window.location.hash)\r\n    window.location.href = window.location.href.replace(/#/, '?fragment=')\r\n```\r\n\r\nI need this in order to do something with the fragments on the server side. But it appears that capybara-webkit is not running this javascript, cause when I check the `current_url` is not displaying the expected behavior. For example i have a request `/login#users` then i convert that to '/login?return_to=users'. This works with selenium though"},"comment":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/comments/191825009","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/884#issuecomment-191825009","issue_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/884","id":191825009,"user":{"login":"jferris","id":7591,"avatar_url":"https://avatars.githubusercontent.com/u/7591?v=3","gravatar_id":"","url":"https://api.github.com/users/jferris","html_url":"https://github.com/jferris","followers_url":"https://api.github.com/users/jferris/followers","following_url":"https://api.github.com/users/jferris/following{/other_user}","gists_url":"https://api.github.com/users/jferris/gists{/gist_id}","starred_url":"https://api.github.com/users/jferris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jferris/subscriptions","organizations_url":"https://api.github.com/users/jferris/orgs","repos_url":"https://api.github.com/users/jferris/repos","events_url":"https://api.github.com/users/jferris/events{/privacy}","received_events_url":"https://api.github.com/users/jferris/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T15:54:41Z","updated_at":"2016-03-03T15:54:41Z","body":"We have a number of test cases around `current_url` and `window.location`, but the behavior there isn't always clear cut. Is there a minimal test case you could put together for the issue you're seeing?"}}