|
|
|
[
Permlink
| « Hide
]
Anand Nalya - 18/Sep/07 04:11 AM
The issue title is wrong here, it should be 'Edittext maxlength does not work'
I could reproduce this bug under FF2-DHTML, SWF is not affected.
------------------------------------------------------------------------
r7793 | bargull | 2008-01-09 23:02:01 +0100 (Wed, 09 Jan 2008) | 35 lines Ge?\195?\164nderte Pfade: M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js M /openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs M /openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs Change 20080106-bargull-2 by bargull@dell--p4--2-53 on 2008-01-06 17:19:46 in /home/Admin/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Adding maxlength for multiline-inputtext (DHTML) New Features: Bugs Fixed: Technical Reviewer: max QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: The HTML-<textarea> object does not support maxlength natively, so we need to implement a js-solution for DHTML. To get the best visual experience, I'm using the "onkeypress"-event, this way we can easily interrupt any user-input as soon as the maxlengt h for the inputtext has been reached. As keyboard-events are handled quite differently across all supported browsers, I needed to add a couple of new quirks to LzSprite, but most of them should be self-explanatory (also see http://www.quirksmode.org/js/keys.html). Pasting text into an inputtext is special-handled to match Flash's behaviour as much as possible: - for IE/Safari, I'm simply using the "onbeforepaste"-event - for Firefox/Opera, I need to detect paste manually because these browsers do not support "onbeforepaste" Flash-behaviour: you can only paste that much chars, as you have still available in the inputtext. Changes in LzText and LzInputText fixes two "stale-data" bugs: you cannot use LzInputText#text to retrieve the current text-value, because t his property does not get updated when the user types in any text. Instead of that, you must use LzInputText#getText(). Tests: see bug-description ------------------------------------------------------------------------ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||