Bug 14389: Editing a syspref in a textarea does not enable the Save button

Test plan:
  1. Navigate to the "opaccredits" syspref (or any other textarea, i.e.,
     "Click to Edit", syspref) in the system preferences editor.
  2. Change its contents, by either pasting or typing. The field may not
     be marked as modified, even after you click outside the box.
  3. Apply the patch.
  4. Reload the page and try again; either pasting or typing should mark
     the field as changed and allow you to save.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Confirmed working for normal input, paste and middle-click paste in
Chrome and Firefox in Linux.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
Liz Rea 2015-06-16 16:12:57 +12:00 committed by Tomas Cohen Arazi
parent d12b4e0b19
commit c95e794bd4

View file

@ -63,7 +63,7 @@ $( document ).ready( function () {
}
$( '.prefs-tab' )
.find( 'input.preference, textarea.preference' ).on('change', function () {
.find( 'input.preference, textarea.preference' ).on('input', function () {
if ( this.defaultValue === undefined || this.value != this.defaultValue ) mark_modified.call( this );
} ).end()
.find( 'select.preference' ).change( mark_modified );