Commit f882f521 authored by Remon Huijts's avatar Remon Huijts
Browse files

Override focus() to prevent execution

parent a2fe9511
......@@ -122961,6 +122961,14 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns) {
this.old_addPaletteFunctions(id, title, expand, fns);
};
 
// Override focus() to prevent execution in EditorUi for an iframe:
var oldHTMLFocus = HTMLElement.prototype.focus;
HTMLElement.prototype.focus = function () {
// Only prevent execution for this specific div:
if (this.className !== 'geDiagramContainer') {
oldHTMLFocus.apply(this, arguments);
}
};
/**
* Function: debug
*
......@@ -244,3 +244,12 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns) {
var expand = expanded || (id === 'totem-security');
this.old_addPaletteFunctions(id, title, expand, fns);
};
// Override focus() to prevent execution in EditorUi for an iframe:
var oldHTMLFocus = HTMLElement.prototype.focus;
HTMLElement.prototype.focus = function () {
// Only prevent execution for this specific div:
if (this.className !== 'geDiagramContainer') {
oldHTMLFocus.apply(this, arguments);
}
};
\ No newline at end of file
Supports Markdown
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