-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now you can submit pressing shift+enter #110
base: master
Are you sure you want to change the base?
Conversation
if (event.charCode === 13 && event.shiftKey) { | ||
this.save(); | ||
this.onEscape(event); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if and else do the same action (this.save() and this.onEscape(event)) then is not necessary if-else. You would rethink the condition using an OR operator maybe.
If you have problems with this logic, contact me and can rethink together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if and else do the same action (this.save() and this.onEscape(event)) then is not necessary if-else. You would rethink the condition using an OR operator maybe.
If you have problems with this logic, contact me and can rethink together.
…arent from method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(A && B && !C) || (!A && B && C)
What's the common factor? ;-)
super.onKeyPress(event); | ||
if ((this.config.saveOnEnter && event.charCode === 13 && !event.shiftKey) || | ||
(!this.config.saveOnEnter && event.charCode === 13 && event.shiftKey)) { | ||
this.save(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(A && B && !C) || (!A && B && C)
What's the common factor? ;-)
@xxxTonixxx, any chance of merging the pull request? Thanks! |
#93