Force Chrome to show GUI messages

add additional yields to nextSteps() to work around a bug recently
introduced to Chrome (other browsers don’t need this kludge). Remember
to take those yields out again when and if Chrome (ever) fixes this
(which, for all I know, may be never)
pull/3/merge
jmoenig 2015-01-12 13:05:14 +01:00
rodzic ff3eed45ea
commit 667193b9f0
2 zmienionych plików z 7 dodań i 0 usunięć

6
gui.js
Wyświetl plik

@ -352,6 +352,7 @@ IDE_Morph.prototype.openIn = function (world) {
function () {
msg = myself.showMessage('Opening project...');
},
function () {nop(); }, // yield (bug in Chrome)
function () {
if (projectData.indexOf('<snapdata') === 0) {
myself.rawOpenCloudDataString(projectData);
@ -2045,6 +2046,7 @@ IDE_Morph.prototype.cloudMenu = function () {
'Opening project...'
);
},
function () {nop(); }, // yield (Chrome)
function () {
myself.rawOpenCloudDataString(
projectData
@ -2924,6 +2926,7 @@ IDE_Morph.prototype.openProjectString = function (str) {
function () {
msg = myself.showMessage('Opening project...');
},
function () {nop(); }, // yield (bug in Chrome)
function () {
myself.rawOpenProjectString(str);
},
@ -2965,6 +2968,7 @@ IDE_Morph.prototype.openCloudDataString = function (str) {
function () {
msg = myself.showMessage('Opening project...');
},
function () {nop(); }, // yield (bug in Chrome)
function () {
myself.rawOpenCloudDataString(str);
},
@ -3015,6 +3019,7 @@ IDE_Morph.prototype.openBlocksString = function (str, name, silently) {
function () {
msg = myself.showMessage('Opening blocks...');
},
function () {nop(); }, // yield (bug in Chrome)
function () {
myself.rawOpenBlocksString(str, name, silently);
},
@ -3061,6 +3066,7 @@ IDE_Morph.prototype.openSpritesString = function (str) {
function () {
msg = myself.showMessage('Opening sprite...');
},
function () {nop(); }, // yield (bug in Chrome)
function () {
myself.rawOpenSpritesString(str);
},

Wyświetl plik

@ -2412,3 +2412,4 @@ ______
* Threads: Dont highlight scripts running inside clones (boosts performance), Thanks, @aranlunzer, for the hint!
* Objects: Disable clones from being edited via their context menus or double-click
* Italian translation update, thanks, Alberto Firpo!
* GUI: add additional yields to nextSteps() (work around a bug in Chrome)