Last modified: 2012-09-22 17:22:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40163, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38163 - jquery.byteLimit incorrectly limits input when using methods other than basic per-char typing
jquery.byteLimit incorrectly limits input when using methods other than basic...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.18.x
All All
: Unprioritized normal (vote)
: 1.20.0 release
Assigned To: Krinkle
:
: 35560 35561 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 13:11 UTC by Krinkle
Modified: 2012-09-22 17:22 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2012-07-04 13:11:35 UTC
Right now it tries to predict what the complete input value will be after the keypress, and either allow or prevent that event.

However this is very unrealiable. For example if the limit is reached and you select all and begin typing, you can't because it will do (this.value + tobeinsertedkey) as prediction, and that's too long.

The solution is to watch *after* the key is pressed and then correct it. Because we can't simulate all possible ways of insertion:
* copy/pasting
* drag/drop
* select>type
* autocomplete
* javascript-powered input methods

Initial attempt: I9ace3ab79 | https://gerrit.wikimedia.org/r/12713.
Reverted in: I1fe6a6c6 | https://gerrit.wikimedia.org/r/14175

because it caused the browser to limit the input field to 0 due to a browser bug (could be the kind of bug that is actually documented in the specification). So we'll have to do this another way.


Upstream: https://code.google.com/p/chromium/issues/detail?id=136004
Reproduced: http://jsfiddle.net/Ea48y/
See also: bug 38158
Comment 1 Krinkle 2012-07-04 13:16:28 UTC
Reproduced (without jQuery): http://jsfiddle.net/KP5h3/
Comment 2 Krinkle 2012-09-14 02:13:23 UTC
Fixed in I9c204243d0bdf7158aa86a62b591ce717a36fe27.
Comment 3 Fomafix 2012-09-14 10:56:33 UTC
*** Bug 35561 has been marked as a duplicate of this bug. ***
Comment 4 Krinkle 2012-09-14 11:47:05 UTC
*** Bug 35560 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links