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