Commit 7e4e11a6 authored by Andreas Gärtner's avatar Andreas Gärtner
Browse files

Fixed app crash when disabled question (mask) is tapped.

parent 01ca6ca1
......@@ -22,7 +22,7 @@ Ext.define('ARSnova.view.CustomMask', {
config: {
baseCls: Ext.baseCSSPrefix + 'mask',
cls: 'displayBlock',
cls: 'displayInherit',
transparent: false,
top: 0,
left: 0,
......@@ -102,11 +102,17 @@ Ext.define('ARSnova.view.CustomMask', {
var x = event.pageX, y = event.pageY;
var containers = [], clicked = false;
var el = document.elementFromPoint(x, y);
var timeoutTries = 30, counter = 0;
while (el && el.tagName !== "BODY" && el.tagName !== "HTML") {
while (el && el.tagName !== "BODY" && el.tagName !== "HTML" && counter < timeoutTries) {
containers.push(el);
el.style.display = "none";
if (el.className === 'videoImageContainer') {
break;
}
el = document.elementFromPoint(x, y);
counter++;
}
for (var i = 0; i < containers.length; i++){
......
......@@ -91,9 +91,7 @@ Ext.define('ARSnova.view.components.GridContainer', {
canvas.id = 'canvasWrapper';
canvas.width = this.getCanvasSize();
canvas.height = this.getCanvasSize();
canvas.style.display = 'block';
canvas.style.margin = '0 auto';
canvas.className = 'canvasConfiguration';
canvas.addEventListener("mouseup", this.onclick, false);
canvas.parentContainer = this;
this.setCanvas(canvas);
......
......@@ -255,8 +255,13 @@
}
}
.displayBlock {
display: block !important;
.canvasConfiguration {
display: block;
margin: 0px auto;
}
.displayInherit {
display: inherit;
}
.customMaskTextElement {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment