Catch exceptions in cursor detection.
If cursor Data URI scheme detection threw an exception, it would cause canvas initialization to fail. cursor detection exceptions should just disable local cursor change support, not cause canvas init to fail.
This commit is contained in:
parent
125d8bbb8f
commit
8171f4d818
|
@ -194,6 +194,7 @@ init: function (id) {
|
||||||
for (i=0; i < 8 * 8 * 4; i++) {
|
for (i=0; i < 8 * 8 * 4; i++) {
|
||||||
curDat.push(255);
|
curDat.push(255);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
curSave = c.style.cursor;
|
curSave = c.style.cursor;
|
||||||
Canvas.changeCursor(curDat, curDat, 2, 2, 8, 8);
|
Canvas.changeCursor(curDat, curDat, 2, 2, 8, 8);
|
||||||
if (c.style.cursor) {
|
if (c.style.cursor) {
|
||||||
|
@ -203,6 +204,10 @@ init: function (id) {
|
||||||
Util.Warn("Data URI scheme cursor not supported");
|
Util.Warn("Data URI scheme cursor not supported");
|
||||||
}
|
}
|
||||||
c.style.cursor = curSave;
|
c.style.cursor = curSave;
|
||||||
|
} catch (exc2) {
|
||||||
|
Util.Error("Data URI scheme cursor test exception: " + exc2);
|
||||||
|
conf.cursor_uri = false;
|
||||||
|
}
|
||||||
|
|
||||||
Canvas.colourMap = [];
|
Canvas.colourMap = [];
|
||||||
Canvas.prevStyle = "";
|
Canvas.prevStyle = "";
|
||||||
|
|
Loading…
Reference in New Issue