summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2015-01-12 13:05:14 +0100
committerjmoenig <jens@moenig.org>2015-01-12 13:05:14 +0100
commit667193b9f02331b3372fefbb9fd4a424d5b86d7e (patch)
treedf5c168ea864a3ce05d8986b1d0ff34853547b5d
parentff3eed45eae2f4af3df5b636cdd59cabf9581e9b (diff)
downloadsnap-667193b9f02331b3372fefbb9fd4a424d5b86d7e.tar.gz
snap-667193b9f02331b3372fefbb9fd4a424d5b86d7e.zip
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)
-rw-r--r--gui.js6
-rwxr-xr-xhistory.txt1
2 files changed, 7 insertions, 0 deletions
diff --git a/gui.js b/gui.js
index d862463..521f27e 100644
--- a/gui.js
+++ b/gui.js
@@ -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);
},
diff --git a/history.txt b/history.txt
index c3c4068..3ca41f8 100755
--- a/history.txt
+++ b/history.txt
@@ -2412,3 +2412,4 @@ ______
* Threads: Don’t 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)