[DE] Fix view mode, select user email using keyboard.
This commit is contained in:
parent
1f8bc3d6f0
commit
c823cb38fe
|
@ -598,7 +598,7 @@ define([
|
|||
}
|
||||
} else {
|
||||
if (top + menuH > docH) {
|
||||
if (fixedAlign) {
|
||||
if (fixedAlign && typeof fixedAlign == 'string') { // how to align if menu height > window height
|
||||
m = fixedAlign.match(/^([a-z]+)-([a-z]+)/);
|
||||
top = offset.top - posMenu[m[1]][1] + posParent[m[2]][1] + this.offset[1] + (fixedOffset || 0);
|
||||
} else
|
||||
|
|
|
@ -1125,10 +1125,10 @@ define([
|
|||
this.popover = Common.Views.ReviewPopover.prototype.getPopover({
|
||||
commentsStore : this.popoverComments,
|
||||
renderTo : this.sdkViewName,
|
||||
userEmail: this.mode.userEmail
|
||||
userEmail: (this.mode) ? this.mode.userEmail : undefined
|
||||
});
|
||||
this.popover.setCommentsStore(this.popoverComments);
|
||||
this.popover.setUserEmail(this.mode.userEmail);
|
||||
(this.mode) && this.popover.setUserEmail(this.mode.userEmail);
|
||||
}
|
||||
return this.popover;
|
||||
},
|
||||
|
@ -1343,7 +1343,7 @@ define([
|
|||
|
||||
this.api.asc_addComment(comment);
|
||||
this.view.showEditContainer(false);
|
||||
this.view.pickEMail(commentVal);
|
||||
this.mode && this.mode.userEmail && this.view.pickEMail(commentVal);
|
||||
if (!_.isUndefined(this.api.asc_SetDocumentPlaceChangedEnabled)) {
|
||||
this.api.asc_SetDocumentPlaceChangedEnabled(false);
|
||||
}
|
||||
|
|
|
@ -894,9 +894,16 @@ define([
|
|||
textBox && textBox.keydown(function (event) {
|
||||
if ( event.keyCode == Common.UI.Keys.SPACE ||
|
||||
event.keyCode == Common.UI.Keys.HOME || event.keyCode == Common.UI.Keys.END || event.keyCode == Common.UI.Keys.RIGHT ||
|
||||
event.keyCode == Common.UI.Keys.LEFT || event.keyCode == Common.UI.Keys.UP || event.keyCode == Common.UI.Keys.DOWN) {
|
||||
event.keyCode == Common.UI.Keys.LEFT || event.keyCode == Common.UI.Keys.UP) {
|
||||
// hide email menu
|
||||
me.onEmailListMenu();
|
||||
} else if (event.keyCode == Common.UI.Keys.DOWN) {
|
||||
if (me.emailMenu && me.emailMenu.rendered && me.emailMenu.isVisible())
|
||||
_.delay(function() {
|
||||
var selected = me.emailMenu.cmpEl.find('li:not(.divider):first');
|
||||
selected = selected.find('a');
|
||||
selected.focus();
|
||||
}, 10);
|
||||
}
|
||||
me.e = event;
|
||||
});
|
||||
|
|
|
@ -232,7 +232,9 @@ define([
|
|||
if (/form-control/.test(e.target.className))
|
||||
me.inFormControl = false;
|
||||
if (!e.relatedTarget ||
|
||||
!/area_id/.test(e.target.id) && ($(e.target).parent().find(e.relatedTarget).length<1 || e.target.localName == 'textarea') /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
|
||||
!/area_id/.test(e.target.id)
|
||||
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
|
||||
&& !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */
|
||||
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
|
||||
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
|
||||
if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement))
|
||||
|
|
Loading…
Reference in a new issue