Skip to content

Commit

Permalink
(js) Restore caret position in message editor
Browse files Browse the repository at this point in the history
Cont'd.

Fixes #4517
  • Loading branch information
cgx committed Aug 21, 2018
1 parent bfd2481 commit e81cf29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion UI/WebServerResources/js/Mailer/MailboxController.js
Expand Up @@ -215,7 +215,6 @@
'new']
.join('/'),
wId = vm.selectedFolder.$id() + '/' + Math.random(0, 1000);
console.debug(url);
$window.open(url, wId,
["width=680",
"height=520",
Expand Down
13 changes: 10 additions & 3 deletions UI/WebServerResources/js/Mailer/Mailer.popup.js
Expand Up @@ -237,8 +237,9 @@
/**
* @ngInject
*/
MessageEditorControllerPopup.$inject = ['$window', '$mdDialog', 'stateAccount', 'stateMessage'];
function MessageEditorControllerPopup($window, $mdDialog, stateAccount, stateMessage) {
MessageEditorControllerPopup.$inject = ['$window', '$q', '$mdDialog', 'stateAccount', 'stateMessage'];
function MessageEditorControllerPopup($window, $q, $mdDialog, stateAccount, stateMessage) {
var onCompleteDeferred = $q.defer();
$mdDialog
.show({
hasBackdrop: false,
Expand All @@ -248,9 +249,15 @@
templateUrl: 'UIxMailEditor',
controller: 'MessageEditorController',
controllerAs: 'editor',
onComplete: function (scope, element) {
return onCompleteDeferred.resolve(element);
},
locals: {
stateAccount: stateAccount,
stateMessage: stateMessage
stateMessage: stateMessage,
onCompletePromise: function () {
return onCompleteDeferred.promise;
}
}
})
.finally(function() {
Expand Down

0 comments on commit e81cf29

Please sign in to comment.