Additional fixes from code review comments
This commit is contained in:
parent
049c3a870a
commit
d4098ed114
|
@ -21,8 +21,7 @@ function ButtonView(options) {
|
||||||
util.inherits(ButtonView, TextView);
|
util.inherits(ButtonView, TextView);
|
||||||
|
|
||||||
ButtonView.prototype.onKeyPress = function(ch, key) {
|
ButtonView.prototype.onKeyPress = function(ch, key) {
|
||||||
let actionForKeyName = key ? key.name : ch;
|
if(this.isKeyMapped('accept', (key ? key.name : ch)) || ' ' === ch) {
|
||||||
if(this.isKeyMapped('accept', actionForKeyName) || ' ' === ch) {
|
|
||||||
this.submitData = 'accept';
|
this.submitData = 'accept';
|
||||||
this.emit('action', 'accept');
|
this.emit('action', 'accept');
|
||||||
delete this.submitData;
|
delete this.submitData;
|
||||||
|
|
|
@ -792,7 +792,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
},
|
},
|
||||||
function prepareViewStates(callback) {
|
function prepareViewStates(callback) {
|
||||||
let from = self.viewControllers.header.getView(MciViewIds.header.from);
|
let from = self.viewControllers.header.getView(MciViewIds.header.from);
|
||||||
if (from !== undefined) {
|
if (from) {
|
||||||
from.acceptsFocus = false;
|
from.acceptsFocus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,7 +918,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
|
||||||
|
|
||||||
initHeaderViewMode() {
|
initHeaderViewMode() {
|
||||||
// Only set header text for from view if it is on the form
|
// Only set header text for from view if it is on the form
|
||||||
if (self.viewControllers.header.getView(MciViewIds.header.from) !== undefined) {
|
if (this.viewControllers.header.getView(MciViewIds.header.from) !== undefined) {
|
||||||
this.setHeaderText(MciViewIds.header.from, this.message.fromUserName);
|
this.setHeaderText(MciViewIds.header.from, this.message.fromUserName);
|
||||||
}
|
}
|
||||||
this.setHeaderText(MciViewIds.header.to, this.message.toUserName);
|
this.setHeaderText(MciViewIds.header.to, this.message.toUserName);
|
||||||
|
|
Loading…
Reference in New Issue