Page MenuHomePhabricator

jquery.byteLimit sometimes causes an unexpected 0 maxLength being enforced
Closed, ResolvedPublic


MediaWiki 1.20 / 07b8a42dddab0bb1cbfd0cd933929bbcc2170d54

Cannot edit edit summary field in Firefox13 and Chrome 21.0.1180.15 dev/OSX.

Antoine is bisecting.

Version: unspecified
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:55 AM
bzimport set Reference to bz38158.

Issue is introduced by Gerrit Change 12713 "jquery.byteLimit: Partial rewrite to fix logic errors"

Will probably be reverted (gerrit 14175), so lowering priority.

Debugging in Chrome, looks like it is not caused by jquery.byteLimit. The browser itself is limiting it.

The native maxLength property is being set to 0.

Turns out that if you set Element.maxLength = undefined; (implied by $input.removeProp('maxLength');)
The property becomes undefined indeed in Chrome and Firefox. But the attribute value is changed to maxlength="0".

So the very code that was indented to disable te native maxLength ends up enforcing it even stronger. Will try to figure out a different solution then, and file a bug upstream.

Revert has been merged.

I filed bug 38163 for the bug that I tried to solve in that commit.

a.d.bergi wrote:

That revert still did not fix the issue - the property is still set to undefined (resulting in zero) when there is a modifier function (Reported at

gerrit #23541 should solve that by fully removing the attribute.

Fixed in I9c204243d0bdf7158aa86a62b591ce717a36fe27.

This is not fixed, as neither patch is merged.

sumanah wrote:

RobLa, since this is a pretty major problem for Firefox 13 & Chrome users (they simply cannot edit the edit summary box), it seems like this should block the next deployment. MatmaRex suggests we should merge the quick-fix changeset at while waiting for Krinkle to improve the more systematic fix.

(In reply to comment #9)

while waiting for Krinkle to improve the more systematic fix.

Done in I9c204243d0bdf7158aa86a62b591ce717a36fe27.

(In reply to comment #11)

queued for merge to 1.20 tarball.

Oops, not actually merged yet..

sumanah wrote:

Thanks for nudging on this, Bartosz.