Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing "Delete" key backwards the page after page is reloaded #836

Closed
daiyam opened this issue Nov 18, 2014 · 4 comments · Fixed by #1502
Closed

Pressing "Delete" key backwards the page after page is reloaded #836

daiyam opened this issue Nov 18, 2014 · 4 comments · Fixed by #1502

Comments

@daiyam
Copy link

daiyam commented Nov 18, 2014

Hi,

I'm creating a new window with a listener on the event beforeunload.

Before any calls to WebContents.reload(), if I pressed the key delete, nothing happens.

After a WebContents.reload(), any press on delete will generate the event beforeunload like it tries to go back in the history navigation.
Without canceling the event beforeunload, the page will reload...

Thx

@zcbenz
Copy link
Member

zcbenz commented Nov 18, 2014

Can you give a simplest example app that can show this problem? And which OS were you using?

@daiyam
Copy link
Author

daiyam commented Nov 18, 2014

Hi,

Here a quick example: download

I'm on OSX 10.9.5

@zcbenz zcbenz added the bug label Nov 21, 2014
@zcbenz zcbenz changed the title WebContents.reload() & key:delete Pressing "Delete" key backwards the page after page is reloaded Nov 21, 2014
@zcbenz
Copy link
Member

zcbenz commented Nov 21, 2014

I can confirm this, before it is fixed you can capture the delete key in page to work around this.

@gabepaez
Copy link

@zcbenz how do you recommend capturing the input? In my testing after a reload has occurred my keyup listener is no longer invoked when pressing the back key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants