[MediaWiki-CodeReview] [MediaWiki r91844]: New comment added

2011-07-11 Thread MediaWiki Mail
User Brion VIBBER posted a comment on MediaWiki.r91844.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91844#c19439
Commit summary:

Add test suite for jquery.byteLimit:
- Tests to verify that the byteLength does not exceed the byteLimit when 
inserting more characters
- Tests to verify that it doesn't prevent too early (ie. if limit is 10 and we 
insert 20 characters, there should be 10 characters in the input field).

This test suite has exposed that the latter is currently broken. 
jquery.byteLimit is preventing characters to be added as soon as 
byteLength(currentValue) + 3 is more than the given limit.

(Follows-up r86698, r91148)

Comment:

r91891 fixes the test cases, including a correction for the last test which 
actually ends up with a length of 12 as there are two more ASCII chars to be 
inserted.

Note that I'm leaving that bug open as there seem to be some general issues, 
and further testing is required to see how things actually work, especially 
with non-BOM characters and funky input method stuff.

___
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview


[MediaWiki-CodeReview] [MediaWiki r91844]: New comment added, and revision status changed

2011-07-11 Thread MediaWiki Mail
User Brion VIBBER changed the status of MediaWiki.r91844.

Old Status: new
New Status: resolved

User Brion VIBBER also posted a comment on MediaWiki.r91844.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91844#c19442
Commit summary:

Add test suite for jquery.byteLimit:
- Tests to verify that the byteLength does not exceed the byteLimit when 
inserting more characters
- Tests to verify that it doesn't prevent too early (ie. if limit is 10 and we 
insert 20 characters, there should be 10 characters in the input field).

This test suite has exposed that the latter is currently broken. 
jquery.byteLimit is preventing characters to be added as soon as 
byteLength(currentValue) + 3 is more than the given limit.

(Follows-up r86698, r91148)

Comment:

r91894 fixes another bug in the test cases; using the array operator to get a 
char from a string (codestr[i]/code) doesn't work in IE6 or IE 7, which 
caused the simulated keypress stuff to fail to update the field properly. 
Switching to codestr.charAt(i)/code fixes this right up!

___
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview


[MediaWiki-CodeReview] [MediaWiki r91844]: New comment added

2011-07-10 Thread MediaWiki Mail
User Krinkle posted a comment on MediaWiki.r91844.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91844#c19410
Commit summary:

Add test suite for jquery.byteLimit:
- Tests to verify that the byteLength does not exceed the byteLimit when 
inserting more characters
- Tests to verify that it doesn't prevent too early (ie. if limit is 10 and we 
insert 20 characters, there should be 10 characters in the input field).

This test suite has exposed that the latter is currently broken. 
jquery.byteLimit is preventing characters to be added as soon as 
byteLength(currentValue) + 3 is more than the given limit.

(Follows-up r86698, r91148)

Comment:

Breakage recorded as [[bugzilla:29804]] (jquery.byteLimit should allow the 
limit to be reached).

Note that this revision didn't introduce the bug, it merely exposed it through 
a unit test.

___
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview