mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 19:33:54 +01:00
give focus back to previous active element instead of focusing on first input
This commit is contained in:
parent
a70e470ffb
commit
e72e628c81
@ -305,13 +305,14 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
|||||||
self.resetDirty();
|
self.resetDirty();
|
||||||
if (self.editor && self.editor.editorContainer)
|
if (self.editor && self.editor.editorContainer)
|
||||||
{
|
{
|
||||||
|
const activeElement = document.activeElement;
|
||||||
self.editor.formatter.toggle(rte_formatblock);
|
self.editor.formatter.toggle(rte_formatblock);
|
||||||
jQuery(self.editor.editorContainer).height(self.options.height);
|
jQuery(self.editor.editorContainer).height(self.options.height);
|
||||||
jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){
|
jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){
|
||||||
if (jQuery('#dragover-tinymce').length < 1) jQuery("<style id='dragover-tinymce'>.dragover:after {height:calc(100% - "+jQuery(this).height()+"px) !important;}</style>").appendTo('head');
|
if (jQuery('#dragover-tinymce').length < 1) jQuery("<style id='dragover-tinymce'>.dragover:after {height:calc(100% - "+jQuery(this).height()+"px) !important;}</style>").appendTo('head');
|
||||||
});
|
});
|
||||||
//set back focus to the first field in the form
|
// give focus back
|
||||||
self.getInstanceManager().focusOnFirstInput();
|
activeElement && activeElement.focus && activeElement.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user