fix focusing window with click on ie
This commit is contained in:
parent
7326de2a48
commit
bf7eba2253
1 changed files with 4 additions and 0 deletions
|
|
@ -48,6 +48,10 @@ var MouseHandler = function(editor) {
|
|||
new DragdropHandler(this);
|
||||
|
||||
var focusEditor = function(e) {
|
||||
// because we have to call event.preventDefault() any window on ie and iframes
|
||||
// on other browsers do not get focus, so we have to call window.focus() here
|
||||
if (!document.hasFocus || !document.hasFocus())
|
||||
window.focus();
|
||||
editor.focus();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue