MDL-32388 SCORM: Fix chrome pop-ups
This commit is contained in:
+8
-7
@@ -1,4 +1,12 @@
|
||||
function scorm_openpopup(url,name,options,width,height) {
|
||||
if (width<=100) {
|
||||
width = Math.round(screen.availWidth * width / 100);
|
||||
}
|
||||
if (height<=100) {
|
||||
height = Math.round(screen.availHeight * height / 100);
|
||||
}
|
||||
options += ",width="+width+",height="+height;
|
||||
|
||||
windowobj = window.open(url,name,options);
|
||||
if (!windowobj) {
|
||||
return;
|
||||
@@ -7,13 +15,6 @@ function scorm_openpopup(url,name,options,width,height) {
|
||||
// Fullscreen
|
||||
windowobj.moveTo(0,0);
|
||||
}
|
||||
if (width<=100) {
|
||||
width = Math.round(screen.availWidth * width / 100);
|
||||
}
|
||||
if (height<=100) {
|
||||
height = Math.round(screen.availHeight * height / 100);
|
||||
}
|
||||
windowobj.resizeTo(width,height);
|
||||
windowobj.focus();
|
||||
return windowobj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user