{"action":"created","issue":{"url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/64","repository_url":"https://api.github.com/repos/alinz/react-native-webview-bridge","labels_url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/64/comments","events_url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/64/events","html_url":"https://github.com/alinz/react-native-webview-bridge/issues/64","id":136859738,"number":64,"title":"stops working after first time","user":{"login":"kadosh1000","id":2615945,"avatar_url":"https://avatars.githubusercontent.com/u/2615945?v=3","gravatar_id":"","url":"https://api.github.com/users/kadosh1000","html_url":"https://github.com/kadosh1000","followers_url":"https://api.github.com/users/kadosh1000/followers","following_url":"https://api.github.com/users/kadosh1000/following{/other_user}","gists_url":"https://api.github.com/users/kadosh1000/gists{/gist_id}","starred_url":"https://api.github.com/users/kadosh1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadosh1000/subscriptions","organizations_url":"https://api.github.com/users/kadosh1000/orgs","repos_url":"https://api.github.com/users/kadosh1000/repos","events_url":"https://api.github.com/users/kadosh1000/events{/privacy}","received_events_url":"https://api.github.com/users/kadosh1000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-27T01:25:37Z","updated_at":"2016-03-31T07:15:47Z","closed_at":null,"body":"Hi, I am using this component and I love it, but i noticed a very wired thing.\r\nOn the first time i go on a view that uses the bridge it works perfectly, but then after exploring the app and going into another view that uses the bridge it just won't work.\r\n\r\nI use the bridge to open links in browser, while I'm on 'Debug with Chrome' mode it works perfectly, but when I'm not in debug mode it just starts making problems.\r\n\r\nhere is the code I'm injecting to the html:\r\n\r\n```js\r\nvar linker = function() {\r\n  var links = document.getElementsByTagName('a');\r\n  for(var i=0, length=links.length; i<length; i++) {\r\n    links[i].onclick = function(e){\r\n      e.preventDefault();\r\n      window.WebViewBridge.send(this.href);\r\n    };\r\n  }\r\n};\r\n\r\nwindow.onload = function() {\r\n  if (window.WebViewBridge) {\r\n    linker()\r\n  }\r\n  else{\r\n    document.addEventListener('WebViewBridge', linker, false);\r\n  }\r\n};\r\n```\r\n\r\nI am using react-native-route-flux, is it possible that it have something to do with moving between routes?\r\n\r\nMaybe it's something you should consider about the mound and unmount of the component. It seems that it won't work after the first time it gets unmounted."},"comment":{"url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/comments/203792546","html_url":"https://github.com/alinz/react-native-webview-bridge/issues/64#issuecomment-203792546","issue_url":"https://api.github.com/repos/alinz/react-native-webview-bridge/issues/64","id":203792546,"user":{"login":"epeli","id":225712,"avatar_url":"https://avatars.githubusercontent.com/u/225712?v=3","gravatar_id":"","url":"https://api.github.com/users/epeli","html_url":"https://github.com/epeli","followers_url":"https://api.github.com/users/epeli/followers","following_url":"https://api.github.com/users/epeli/following{/other_user}","gists_url":"https://api.github.com/users/epeli/gists{/gist_id}","starred_url":"https://api.github.com/users/epeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epeli/subscriptions","organizations_url":"https://api.github.com/users/epeli/orgs","repos_url":"https://api.github.com/users/epeli/repos","events_url":"https://api.github.com/users/epeli/events{/privacy}","received_events_url":"https://api.github.com/users/epeli/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T07:15:47Z","updated_at":"2016-03-31T07:15:47Z","body":"I'm seeing this too (Android)."}}