File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 512512
513513 _onTypeComment : function ( ev ) {
514514 var $field = $ ( ev . target ) ;
515- var len = $field . val ( ) . length ;
515+ var len = $field . text ( ) . length ;
516516 var $submitButton = $field . data ( 'submitButtonEl' ) ;
517517 if ( ! $submitButton ) {
518518 $submitButton = $field . closest ( 'form' ) . find ( '.submit' ) ;
Original file line number Diff line number Diff line change @@ -411,15 +411,15 @@ describe('OCA.Comments.CommentsTabView tests', function() {
411411 expect ( $message . hasClass ( 'error' ) ) . toEqual ( false ) ;
412412 } ) ;
413413 it ( 'displays tooltip when limit is almost reached' , function ( ) {
414- $message . val ( createMessageWithLength ( view . _commentMaxLength - 2 ) ) ;
414+ $message . text ( createMessageWithLength ( view . _commentMaxLength - 2 ) ) ;
415415 $message . trigger ( 'change' ) ;
416416
417417 expect ( tooltipStub . calledWith ( 'show' ) ) . toEqual ( true ) ;
418418 expect ( $submitButton . prop ( 'disabled' ) ) . toEqual ( false ) ;
419419 expect ( $message . hasClass ( 'error' ) ) . toEqual ( false ) ;
420420 } ) ;
421421 it ( 'displays tooltip and disabled button when limit is exceeded' , function ( ) {
422- $message . val ( createMessageWithLength ( view . _commentMaxLength + 2 ) ) ;
422+ $message . text ( createMessageWithLength ( view . _commentMaxLength + 2 ) ) ;
423423 $message . trigger ( 'change' ) ;
424424
425425 expect ( tooltipStub . calledWith ( 'show' ) ) . toEqual ( true ) ;
You can’t perform that action at this time.
0 commit comments