kopia lustrzana https://github.com/backface/turtlestitch
display a permanent warning when using IE
rodzic
09fc0060b4
commit
2acfe34f1b
|
@ -8,6 +8,7 @@
|
||||||
* **Notable Changes:**
|
* **Notable Changes:**
|
||||||
* made "i" upvar inside FOR loop's C-Shape slot mutable by user script
|
* 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)
|
* 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:**
|
* **Notable Fixes:**
|
||||||
* typing strings into the search-field again shows relevant blocks (regression from IME)
|
* typing strings into the search-field again shows relevant blocks (regression from IME)
|
||||||
* fixed project dialog's search-field behevior (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)
|
* gui: prevent switching to another sprite if a block editor is open (so local blocks of different sprites don't mix)
|
||||||
* updated German translation
|
* updated German translation
|
||||||
* gui: simplified asset loading scheduler
|
* gui: simplified asset loading scheduler
|
||||||
|
* gui: display a permenent warning when using IE
|
||||||
|
|
||||||
### 2019-10-14
|
### 2019-10-14
|
||||||
* morphic: new "reactToInput" text-editing event
|
* morphic: new "reactToInput" text-editing event
|
||||||
|
|
38
src/gui.js
38
src/gui.js
|
@ -550,6 +550,8 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
} else {
|
} else {
|
||||||
interpretUrlAnchors.call(this);
|
interpretUrlAnchors.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.warnAboutIE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// IDE_Morph construction
|
// 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 ////////////////////////////////////////////////////
|
||||||
|
|
||||||
// ProjectDialogMorph inherits from DialogBoxMorph:
|
// ProjectDialogMorph inherits from DialogBoxMorph:
|
||||||
|
|
Ładowanie…
Reference in New Issue