Improved error handling.
This commit is contained in:
parent
c6fec78bf9
commit
fde8d11b5f
1 changed files with 9 additions and 7 deletions
|
@ -104,13 +104,15 @@
|
|||
|
||||
// break <blockquote> after enter on empty line
|
||||
sel = window.getSelection()
|
||||
if (sel) {
|
||||
node = $(sel.anchorNode)
|
||||
if (node.parent().is('blockquote')) {
|
||||
if (node && node.parent() && node.parent().is('blockquote')) {
|
||||
e.preventDefault()
|
||||
document.execCommand('Insertparagraph')
|
||||
document.execCommand('Outdent')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// behavior to enter new line on alt+enter
|
||||
// on alt + enter not realy newline is fired, to make
|
||||
|
@ -246,7 +248,7 @@
|
|||
|
||||
// limit check
|
||||
if ( !_this.allowKey(e) ) {
|
||||
if ( !_this.maxLengthOk( 1 ) ) {
|
||||
if ( !_this.maxLengthOk(1) ) {
|
||||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue