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

Endi Sukma Dewata edewata at redhat.com
Fri Jun 1 00:46:29 UTC 2012


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.

-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list