Page MenuHomePhabricator

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

Description

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
URL: https://translatewiki.net/w/i.php?title=User:Siebrand/test15&action=edit

Details

Reference
bz38158

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:55 AM
bzimport set Reference to bz38158.
siebrand created this task.Jul 4 2012, 8:49 AM
hashar added a comment.Jul 4 2012, 8:50 AM

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 http://de.wikipedia.org/?oldid=107992278#jquery.byteLimit_und_sein_Callback).

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 https://gerrit.wikimedia.org/r/#/c/23541/ 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.

queued for merge to 1.20 tarball.

Reedy added a comment.Oct 1 2012, 12:49 PM

(In reply to comment #11)

queued for merge to 1.20 tarball.

https://gerrit.wikimedia.org/r/25874

Reedy added a comment.Oct 1 2012, 12:50 PM

Oops, not actually merged yet..

Merged now.

sumanah wrote:

Thanks for nudging on this, Bartosz.

.. and merged to 1.20.