Commit bbd51a4e authored by Daniel Gerhardt's avatar Daniel Gerhardt

Fix TypeError on touch events in Firefox

parent 5035cf34
......@@ -43,7 +43,8 @@ Ext.require([
'Ext.chart.CartesianChart',
'Ext.SegmentedButton',
'Ext.data.JsonStore',
'Ext.device.Device'
'Ext.device.Device',
'ARSnova.override.viewport.Default'
]);
Ext.application({
......
Ext.define('ARSnova.override.viewport.Default', {
override: 'Ext.viewport.Default',
doBlurInput: function (e) {
var target = e.target,
focusedElement = this.focusedElement;
// In IE9/10 browser window loses focus and becomes inactive if focused element is <body>. So we shouldn't call blur for <body>
if (focusedElement && focusedElement.nodeName.toUpperCase() !== 'BODY' && !this.isInputRegex.test(target.tagName)) {
delete this.focusedElement;
if (focusedElement.blur) {
/* focusedElement.blur might be undefined in FF */
focusedElement.blur();
}
}
}
});
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