-
Notifications
You must be signed in to change notification settings - Fork 975
Window.onbeforeunload not working in Brave #4079
Comments
FYI, not getting an alert from this jsfiddle in Firefox (47) either. |
Edit: If you execute the following example code in FF and Chrome it will work:
Brave does not seem to work if you execite this code in the console. For some reason the jsfiddle is not handling this event correctly so can't test it there. I have updated the original issue. |
looks like we need to handle |
@bridiver Can you set a milestone for this issue, because all websites that take advantage of this callback function in order the user to confirm their navigation, are simply unusable since you can't navigate out of the page? |
this does seem like a pretty serious issue. I also noticed that the urlbar displays any domain you attempt to navigate to as if it were the current url which makes this a potential attack vector for urlbar spoofing @diracdeltas @bbondy |
actually I think it might be the result of a patch that electron applies to chromium. I'm not sure about it yet, but I came across it during the 54 upgrade
|
@darkdh would you mind looking at this? |
sure, no problem |
@darkdh I haven't test it yet, but I have a potential fix in the chromium54 branch
|
fixed by brave/muon@5f8f5a9 |
Test plan: Open https://jsfiddle.net/L5grdj3a/ |
Please update it to a correct one if it's wrong, thanks |
Did you search for similar issues before submitting this one?
No
Describe the issue you encountered:
Create a webpage with the following js :
If you try to navigate you are stuck in the page with no alert or nothing. In FF and Chrome it works ok, giving you an alert according to https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
Note that the following code does not work on jsfiddle for some reason it has to be on a regular web page.
Expected behavior:
Brave should show an alert.
All
0.12.1
The text was updated successfully, but these errors were encountered: