display a permanent warning when using IE

pull/89/head
jmoenig 2019-10-15 13:37:53 +02:00
rodzic 09fc0060b4
commit 2acfe34f1b
2 zmienionych plików z 40 dodań i 0 usunięć

Wyświetl plik

@ -8,6 +8,7 @@
* **Notable Changes:**
* made "i" upvar inside FOR loop's C-Shape slot mutable by user script
* prevent switching to another sprite if a block editor is open (so local blocks of different sprites don't mix)
* display a permanent warning when using IE
* **Notable Fixes:**
* typing strings into the search-field again shows relevant blocks (regression from IME)
* fixed project dialog's search-field behevior (regression from IME)
@ -26,6 +27,7 @@
* gui: prevent switching to another sprite if a block editor is open (so local blocks of different sprites don't mix)
* updated German translation
* gui: simplified asset loading scheduler
* gui: display a permenent warning when using IE
### 2019-10-14
* morphic: new "reactToInput" text-editing event

Wyświetl plik

@ -550,6 +550,8 @@ IDE_Morph.prototype.openIn = function (world) {
} else {
interpretUrlAnchors.call(this);
}
this.warnAboutIE();
};
// IDE_Morph construction
@ -6002,6 +6004,42 @@ IDE_Morph.prototype.prompt = function (message, callback, choices, key) {
);
};
// IDE_Morph bracing against IE
IDE_Morph.prototype.warnAboutIE = function () {
var dlg, txt;
if (this.isIE()) {
dlg = new DialogBoxMorph();
txt = new TextMorph(
'Please do not use Internet Explorer.\n' +
'Snap! runs best in a web-standards\n' +
'compliant browser',
dlg.fontSize,
dlg.fontStyle,
true,
false,
'center',
null,
null,
MorphicPreferences.isFlat ? null : new Point(1, 1),
new Color(255, 255, 255)
);
dlg.key = 'IE-Warning';
dlg.labelString = "Internet Explorer";
dlg.createLabel();
dlg.addBody(txt);
dlg.drawNew();
dlg.fixLayout();
dlg.popUp(this.world());
}
};
IDE_Morph.prototype.isIE = function () {
var ua = navigator.userAgent;
return ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
};
// ProjectDialogMorph ////////////////////////////////////////////////////
// ProjectDialogMorph inherits from DialogBoxMorph: