[Freeipa-devel] [PATCH] 150 Text widget's dirty state is changed on various input methods

Petr Vobornik pvoborni at redhat.com
Mon Jun 4 10:05:02 UTC 2012


On 06/01/2012 02:46 AM, Endi Sukma Dewata wrote:
> On 5/28/2012 6:44 AM, Petr Vobornik wrote:
>> on_value_changed event in textboxes and textareas was raised only on
>> keyboard input. If user used different input method such as paste or
>> browser undo and redo functions widget's on_value_changed event wasn't
>> raised and so dirty state wasn't changed as well.
>>
>> This patch adds listener to text's and textarea's 'input' event. Input
>> is a HTML 5 event which is raises on user initiated action.
>> Some of user initiated actions :
>> * Cut
>> * Copy
>> * Paste
>> * Undo
>> * Redo
>> * Clear
>> * Typing (like keyup)
>> * Form AutoFill
>> * User-invoked spellcheck corrections
>> * Input from Input Method Editor
>>
>> It should be supported by all recent versions of major browsers. IE
>> doesn't support it up to version 8.
>>
>> Listener for 'keyup' event was left in implementation for backward
>> compatibility with older browsers. This may cause firing on_value_change
>> twice but so far it shouldn't cause troubles.
>
> Yeah, if it becomes a problem later you might need to check the browser
> version and only listen to one of the events.
>
> ACK.
>
Pushed to master.

-- 
Petr Vobornik




More information about the Freeipa-devel mailing list