https://bugzilla.wikimedia.org/show_bug.cgi?id=29467

--- Comment #13 from Krinkle <[email protected]> 2012-08-16 17:07:12 UTC ---
(In reply to comment #12)
> Can we do both (prevent input if adding the character would go over the limit,
> and chopping things after the fact if the user manages to somehow get 
> something
> past the limit)?

Yes we should try, but no I have no clue how. Because our browsers have been so
nice to have no way to implement this (afaik). All we can do is watch for key
presses, and when they do there is no way of knowing where it came from and
what it will do (e.g. Narayam[1] is also watching, and when it sees "e" after
"a" it could[2] turn it into "ae". If the "a" is the last character to be
insertable, we need to allow Narayam to change the value. But if we listen for
keypress[3], and prevent if current value + character-of-key-being-pressed - it
will not work as expected. That's exactly the problem.

I'm open to other ideas, but I think it is technically simply impossible to do
both in the current browser world.

[1] https://www.mediawiki.org/wiki/Extension:Narayam
[2] I don't know whether there is a German module that does this, its just an
example.
[3] Or keyup/keydown..

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to