Page MenuHomePhabricator

jquery.byteLimit with callback should not go into an endless loop when text is longer than max
Closed, ResolvedPublic

Description

Using jQuery.byteLimit with callback can go into a endless loop, when the text returned by the callback is longer than the maximum.

Use the following command and type some text into the input:
$( '<input />' ).appendTo( '#firstHeading' ).byteLimit( 5, function( text ) { return 'longText'+text; } );

Maybe you have to load the byteLimit function before, use this command:
mw.loader.load('jquery.byteLimit');


Version: 1.21.x
Severity: normal

Details

Reference
bz41450