mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix cke editor focus detection
This commit is contained in:
parent
9b59ad32dc
commit
07b0f20305
7 changed files with 192 additions and 174 deletions
|
|
@ -389,11 +389,17 @@ Utils.initOnStartOrLangChange = function (fCallback, oScope, fLangCallback)
|
||||||
*/
|
*/
|
||||||
Utils.inFocus = function ()
|
Utils.inFocus = function ()
|
||||||
{
|
{
|
||||||
var oActiveObj = document.activeElement;
|
if (document.activeElement)
|
||||||
return (oActiveObj && ('INPUT' === oActiveObj.tagName ||
|
{
|
||||||
'TEXTAREA' === oActiveObj.tagName ||
|
if (Utils.isUnd(document.activeElement.__inFocusCache))
|
||||||
'IFRAME' === oActiveObj.tagName ||
|
{
|
||||||
('DIV' === oActiveObj.tagName && 'editorHtmlArea' === oActiveObj.className && oActiveObj.contentEditable)));
|
document.activeElement.__inFocusCache = $(document.activeElement).is('input,textarea,iframe,.cke_editable');
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!document.activeElement.__inFocusCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.removeInFocus = function ()
|
Utils.removeInFocus = function ()
|
||||||
|
|
@ -401,7 +407,7 @@ Utils.removeInFocus = function ()
|
||||||
if (document && document.activeElement && document.activeElement.blur)
|
if (document && document.activeElement && document.activeElement.blur)
|
||||||
{
|
{
|
||||||
var oA = $(document.activeElement);
|
var oA = $(document.activeElement);
|
||||||
if (oA.is('input') || oA.is('textarea'))
|
if (oA.is('input,textarea'))
|
||||||
{
|
{
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.6.6",
|
"version": "1.6.6",
|
||||||
"release": "924",
|
"release": "928",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
|
|
|
||||||
|
|
@ -1123,11 +1123,17 @@ Utils.initOnStartOrLangChange = function (fCallback, oScope, fLangCallback)
|
||||||
*/
|
*/
|
||||||
Utils.inFocus = function ()
|
Utils.inFocus = function ()
|
||||||
{
|
{
|
||||||
var oActiveObj = document.activeElement;
|
if (document.activeElement)
|
||||||
return (oActiveObj && ('INPUT' === oActiveObj.tagName ||
|
{
|
||||||
'TEXTAREA' === oActiveObj.tagName ||
|
if (Utils.isUnd(document.activeElement.__inFocusCache))
|
||||||
'IFRAME' === oActiveObj.tagName ||
|
{
|
||||||
('DIV' === oActiveObj.tagName && 'editorHtmlArea' === oActiveObj.className && oActiveObj.contentEditable)));
|
document.activeElement.__inFocusCache = $(document.activeElement).is('input,textarea,iframe,.cke_editable');
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!document.activeElement.__inFocusCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.removeInFocus = function ()
|
Utils.removeInFocus = function ()
|
||||||
|
|
@ -1135,7 +1141,7 @@ Utils.removeInFocus = function ()
|
||||||
if (document && document.activeElement && document.activeElement.blur)
|
if (document && document.activeElement && document.activeElement.blur)
|
||||||
{
|
{
|
||||||
var oA = $(document.activeElement);
|
var oA = $(document.activeElement);
|
||||||
if (oA.is('input') || oA.is('textarea'))
|
if (oA.is('input,textarea'))
|
||||||
{
|
{
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1127,11 +1127,17 @@ Utils.initOnStartOrLangChange = function (fCallback, oScope, fLangCallback)
|
||||||
*/
|
*/
|
||||||
Utils.inFocus = function ()
|
Utils.inFocus = function ()
|
||||||
{
|
{
|
||||||
var oActiveObj = document.activeElement;
|
if (document.activeElement)
|
||||||
return (oActiveObj && ('INPUT' === oActiveObj.tagName ||
|
{
|
||||||
'TEXTAREA' === oActiveObj.tagName ||
|
if (Utils.isUnd(document.activeElement.__inFocusCache))
|
||||||
'IFRAME' === oActiveObj.tagName ||
|
{
|
||||||
('DIV' === oActiveObj.tagName && 'editorHtmlArea' === oActiveObj.className && oActiveObj.contentEditable)));
|
document.activeElement.__inFocusCache = $(document.activeElement).is('input,textarea,iframe,.cke_editable');
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!document.activeElement.__inFocusCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.removeInFocus = function ()
|
Utils.removeInFocus = function ()
|
||||||
|
|
@ -1139,7 +1145,7 @@ Utils.removeInFocus = function ()
|
||||||
if (document && document.activeElement && document.activeElement.blur)
|
if (document && document.activeElement && document.activeElement.blur)
|
||||||
{
|
{
|
||||||
var oA = $(document.activeElement);
|
var oA = $(document.activeElement);
|
||||||
if (oA.is('input') || oA.is('textarea'))
|
if (oA.is('input,textarea'))
|
||||||
{
|
{
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
rainloop/v/0.0.0/static/js/app.min.js
vendored
12
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue