mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Compose focus fixes (#547)
This commit is contained in:
parent
30b7ce263f
commit
4a90e2406c
6 changed files with 41 additions and 13 deletions
|
|
@ -384,7 +384,6 @@
|
|||
this.setHtml('', bFocus);
|
||||
};
|
||||
|
||||
|
||||
module.exports = HtmlEditor;
|
||||
|
||||
}());
|
||||
9
dev/External/ko.js
vendored
9
dev/External/ko.js
vendored
|
|
@ -131,7 +131,7 @@
|
|||
if (Globals && Globals.aBootstrapDropdowns)
|
||||
{
|
||||
Globals.aBootstrapDropdowns.push($(oElement));
|
||||
|
||||
|
||||
$(oElement).click(function () {
|
||||
require('Common/Utils').detectDropdownVisibility();
|
||||
});
|
||||
|
|
@ -688,6 +688,13 @@
|
|||
'focusCallback': fFocusCallback,
|
||||
'inputDelimiters': [',', ';'],
|
||||
'autoCompleteSource': fAutoCompleteSource,
|
||||
// 'elementHook': function (oEl, oItem) {
|
||||
// if (oEl && oItem)
|
||||
// {
|
||||
// oEl.addClass('pgp');
|
||||
// window.console.log(arguments);
|
||||
// }
|
||||
// },
|
||||
'parseHook': function (aInput) {
|
||||
return _.map(aInput, function (sInputValue) {
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@
|
|||
&.inputosaurus-selected {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
&.pgp {
|
||||
background-color: #E5F3E2;
|
||||
}
|
||||
}
|
||||
|
||||
.inputosaurus-input {
|
||||
|
|
|
|||
|
|
@ -751,6 +751,8 @@
|
|||
|
||||
this.bSkipNextHide = false;
|
||||
|
||||
this.to.focused(false);
|
||||
|
||||
kn.routeOn();
|
||||
};
|
||||
|
||||
|
|
@ -761,12 +763,14 @@
|
|||
var self = this;
|
||||
if (!this.oEditor && this.composeEditorArea())
|
||||
{
|
||||
//_.delay(function () {
|
||||
self.oEditor = new HtmlEditor(self.composeEditorArea(), null, function () {
|
||||
fOnInit(self.oEditor);
|
||||
self.resizerTrigger();
|
||||
}, function (bHtml) {
|
||||
self.isHtml(!!bHtml);
|
||||
});
|
||||
//}, 1000);
|
||||
}
|
||||
else if (this.oEditor)
|
||||
{
|
||||
|
|
@ -1226,6 +1230,10 @@
|
|||
self.setFocusInPopup();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setFocusInPopup();
|
||||
}
|
||||
|
||||
aDownloads = this.getAttachmentsDownloadsForUpload();
|
||||
if (Utils.isNonEmptyArray(aDownloads))
|
||||
|
|
@ -1276,21 +1284,27 @@
|
|||
{
|
||||
if (!Globals.bMobileDevice)
|
||||
{
|
||||
if ('' === this.to())
|
||||
{
|
||||
this.to.focused(false);
|
||||
this.to.focused(true);
|
||||
}
|
||||
else if (this.oEditor)
|
||||
{
|
||||
this.oEditor.focus();
|
||||
}
|
||||
var self = this;
|
||||
_.delay(function () {
|
||||
|
||||
if ('' === self.to())
|
||||
{
|
||||
self.to.focused(true);
|
||||
}
|
||||
else if (self.oEditor)
|
||||
{
|
||||
if (!self.to.focused())
|
||||
{
|
||||
self.oEditor.focus();
|
||||
}
|
||||
}
|
||||
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
ComposePopupView.prototype.onShowWithDelay = function ()
|
||||
{
|
||||
this.setFocusInPopup();
|
||||
this.resizerTrigger();
|
||||
};
|
||||
|
||||
|
|
|
|||
4
vendors/inputosaurus/inputosaurus.js
vendored
4
vendors/inputosaurus/inputosaurus.js
vendored
|
|
@ -64,6 +64,8 @@
|
|||
// the array of tag names is passed and expected to be returned as an array after manipulation
|
||||
parseHook : null,
|
||||
|
||||
elementHook : null,
|
||||
|
||||
// define a placeholder to display when the input is empty
|
||||
placeholder: null
|
||||
},
|
||||
|
|
@ -536,6 +538,8 @@
|
|||
});
|
||||
}
|
||||
|
||||
$.isFunction(this.options.elementHook) && (this.options.elementHook($li, obj));
|
||||
|
||||
return $li;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
2
vendors/inputosaurus/inputosaurus.min.js
vendored
2
vendors/inputosaurus/inputosaurus.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