Page MenuHomePhabricator

jquery.byteLimit shouldn't set element specific variables outside the "return this.each" loop
Closed, ResolvedPublic

Description

r110209 sets the following line

$( '#wpReason, #wpNewTitleMain' ).byteLimit();

but that adds the maxlength of #wpNewTitleMain (255) also to #wpReason and the own maxlength of #wpReason (200) is not used. When #wpNewTitleMain is removed from dom before the above line is executed, the line adds -1 to #wpReason, which break at least Opera 11 (you cannot input anything in #wpReason).

Please fix byteLimit to handle the maxLenght of each id seperatly. Thanks.


Version: 1.19
Severity: major

Details

Reference
bz35294

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:13 AM
bzimport set Reference to bz35294.