Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You break mobile apps that use a webview, as my history trail never ends


Can you please provide repro steps? Whatever is happening I am happy to fix.

Also, the source code is 100% open source and pull requests are encouraged: https://github.com/breck7/pldb


For me, repro steps are:

1. Vist the page on Firefox Nightly for Android

2. Attempt to use the back gesture to go back

3. Observe you cannot go back

Workaround is to swipe back furiously, presumably before the page is able to add additional locations to browser history.

Without actually pulling this code or doing any debugging, I believe the issue is this line here, at some point during the initial page load you are setting `location.hash` (watching the actual URL I can see that it happens) which adds a navigation event to your history and interferes with the back button.

https://github.com/breck7/pldb/blob/ae07a2e4dfcc15bf8c16c4ca...


Awesome repro steps. Appreciate the effort.

Any idea why this only happens in Android on Firefox? I can't repro in Firefox on MacOS, or Chrome, or Safari.

Might it be a bug in Android on Firefox?


It also doesn't happen in Chrome in Android. I do not know why one browser would trigger that code path while another would not, perhaps they all trigger the code but most of them discard JS induced navigation events that fire during a page load.


Ok. At some point I need to clean up that code and add some unit tests. I'm sure at that point will get this fixed.

This is v0.1.0 of the Explorer.

Really appreciate the help!


You could probably go ahead and start using `location.replace` with a minor refactor. The difference in behavior there would be when someone updates their query, a new entry is not added to history. Whether that's a regression or an improvement is probably user dependent. IMO, it's better not to have a bunch of history items for playing with one table.


You are probably right. My todo list is a mile long though so won't get to this for a while. Open to pull requests.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: