bunsenbrowser / bunsen

🔥 Bunsen Browser provides easy to use offline P2P application and file distribution that is verifiable on Android devices. https://bunsenbrowser.github.io/
117 stars 7 forks source link

Clear iframe when user focuses on address bar to display history and other upcoming dat sharing options #42

Closed chrisekelley closed 6 years ago

chrisekelley commented 6 years ago

When you have a dat loaded, you cannot view the history - it only appears when the app starts.

chrisekelley commented 6 years ago

Weird bug on my local instance - it's fine now. Closing.

chrisekelley commented 6 years ago

Am hitting this bug - after loading a dat, I get this error and the iframe is not cleared when focusing on the address bar:

bunsen-app.html:84 Uncaught ReferenceError: setTimout is not defined
    at HTMLElement.$.address.addEventListener (bunsen-app.html:84)
chrisekelley commented 6 years ago

well of course **_setTimout_** is not defined since it is misspelled!

chrisekelley commented 6 years ago

Well, that wasn't the issue - there is another event other than focusin that is getting triggered that we must catch.

getEventListeners(this.$.address); returns these events:

monitorEvents(this.$.address, ["addon-attached", "blur", "focus", "iron-input-ready", "keydown", "keyup"]); will list events as they are triggered. Source: https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3#geteventlistenersobject

chrisekelley commented 6 years ago

It's the focusout event - if you click on the delete address button, a focusout event also gets triggered.

rjcorwin commented 6 years ago

@chrisekelley Aha. How about instead of closing history on focusout, we add a button next to the delete address button for going back to the address open?

chrisekelley commented 6 years ago

hey that works fine! Accepted your PR.