5 ms·
Sorry! This page is new. The source is below: https://github.com/breck7/pldb/blob/main/code/browser/explorer/explorer.js https://github.com/breck7/pldb/blob/m
by breck 2y ago
Sorry!
This page is new. The source is below:
https://github.com/breck7/pldb/blob/main/code/browser/explorer/explorer.js https://github.com/breck7/pldb/blob/main/code/browser/explor...
Can you explain what you are doing and what you expect? I can get a fix out.
- Bjartr 2y agoI think the back button is fine, it's the keyboard shortcut for Go Back, `alt-left`, that's broken. The `scrollKeyboardNav` element's "press left/right to go to the prev/next language" keydown handler is triggering even when alt is being held is preempting the Go Back shortcut.
- breck 2y agoAh, got it! Yeah the keyboard nav should not be on that page. Just removed it (should be live in a minute or two). Thank you! https://github.com/breck7/pldb/commit/111b2c061df080d042297f404f141457147ebcc3 https://github.com/breck7/pldb/commit/111b2c061df080d042297f...
- Zetaphor 2y agoYou break mobile apps that use a webview, as my history trail never ends
- breck 2y agoCan 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 https://github.com/breck7/pldb
- DangitBobby 2y agoFor 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/ae07a2e4dfcc15bf8c16c4cafcb34ffcdf2c7da8/code/browser/explorer/explorer.js#L101 https://github.com/breck7/pldb/blob/ae07a2e4dfcc15bf8c16c4ca...
- breck 2y agoAwesome 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?
- DangitBobby 2y agoIt 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.
- breck 2y agoOk. 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!
- DangitBobby 2y agoYou 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.
- breck 2y agoYou are probably right. My todo list is a mile long though so won't get to this for a while. Open to pull requests.