-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u92
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
JavaFxBrowser does NOT support window.onbeforeunload=true. In All other major browsers, doing this will ask the user whether they want to leave or not (they probably have unsaved changes).
Since the applet will be no longer supported, you have suggested that sites use webstart to startup a JavaFx browser and then overlay the java ontop of the JavaFxBrowser.
We can't do this successfully without having support for window.onbeforeunload=true since our HTML pages rely on that feature.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try this jsfiddle, when attempt to leave the the page in all major browsers, you should be given some sort of confirm action dialog:
https://jsfiddle.net/zalun/yFuPr/
Here is the javascript to reproduce yourself on a JavaFxBrowser:
window.onbeforeunload = function(e) {
e = e || window.event;
e.preventDefault = true;
e.cancelBubble = true;
e.returnValue = 'test';
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
confimration dialog on attempt to renavigate browser
ACTUAL -
no confirmation dialog, unsaved changes will be lost
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
https://jsfiddle.net/zalun/yFuPr/
Here is the javascript to reproduce yourself on a JavaFxBrowser:
window.onbeforeunload = function(e) {
e = e || window.event;
e.preventDefault = true;
e.cancelBubble = true;
e.returnValue = 'test';
}
---------- END SOURCE ----------
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 64-bit
A DESCRIPTION OF THE PROBLEM :
JavaFxBrowser does NOT support window.onbeforeunload=true. In All other major browsers, doing this will ask the user whether they want to leave or not (they probably have unsaved changes).
Since the applet will be no longer supported, you have suggested that sites use webstart to startup a JavaFx browser and then overlay the java ontop of the JavaFxBrowser.
We can't do this successfully without having support for window.onbeforeunload=true since our HTML pages rely on that feature.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try this jsfiddle, when attempt to leave the the page in all major browsers, you should be given some sort of confirm action dialog:
https://jsfiddle.net/zalun/yFuPr/
Here is the javascript to reproduce yourself on a JavaFxBrowser:
window.onbeforeunload = function(e) {
e = e || window.event;
e.preventDefault = true;
e.cancelBubble = true;
e.returnValue = 'test';
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
confimration dialog on attempt to renavigate browser
ACTUAL -
no confirmation dialog, unsaved changes will be lost
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
https://jsfiddle.net/zalun/yFuPr/
Here is the javascript to reproduce yourself on a JavaFxBrowser:
window.onbeforeunload = function(e) {
e = e || window.event;
e.preventDefault = true;
e.cancelBubble = true;
e.returnValue = 'test';
}
---------- END SOURCE ----------
- duplicates
-
JDK-8160749 WebView does not support window.onbeforeunload
-
- Open
-