Last modified: 2012-11-17 03:52:08 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 T42850, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40850 - jquery.byteLimit rewrite sometimes removes the last character instead of the most recently added, even if it could know this
jquery.byteLimit rewrite sometimes removes the last character instead of the ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.21.x
All All
: Normal major with 1 vote (vote)
: 1.21.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-08 09:04 UTC by Michael M.
Modified: 2012-11-17 03:52 UTC (History)
5 users (show)

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


Attachments

Description Michael M. 2012-10-08 09:04:36 UTC
To reproduce make sure your wiki is up to date, load jquery.byteLimit, create an input with a limit of 6 bytes and do the following steps.

1. Enter "äöü", move the cursor to the start.
2. Type "ß"

Expected result: Nothing, "äöü" are 6 bytes.
Actual result: Text changes to "ßäö".
Possible solution: Always update the last value, not only if it has been trimmed.
Comment 1 Helder 2012-11-11 14:40:07 UTC
I'm also experiencing this problem and it is really annoying.
* When I paste something which makes the total length to exceed the limit, the script remove part of what is at the end of the string (instead of part of what I'm pasting or of not pasting at all) and focus at the last character
* Then I have to go back to the middle of the string to find where is the text I was trying to change, and undo my changes (since they won't be accepted because of the limit);
* Then also go back to the end of the string to manually restore the original string (this is particularly important when the end of the string is a "[[link]]", which would break without closing "]]"), without being able to use CTRL+Z to undo the mess made by the script.
Comment 2 Bartosz Dziewoński 2012-11-15 12:26:38 UTC
Fix submitted as Gerrit change #33556.
Comment 3 Bartosz Dziewoński 2012-11-16 21:43:58 UTC
Fix merged by Krinkle.

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


Navigation
Links