[Koha-bugs] [Bug 14389] Editing a syspref in a textarea does not enable the Save button

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 23 06:09:20 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14389

--- Comment #15 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #13)
> (In reply to David Cook from comment #12)
> > I was thinking about this bug recently. 
> > 
> > I suppose it still won't work for WYSIWYG editors in some cases, but that's
> > not a community concern (yet). I'll have to do some thinking on that one
> > when I have time...
> 
> Oh wait. Liz pointed out that it's on "input" and not on "change".
> 
> It might work for WYSIWYG editors as well! I'll look into this!

(In reply to David Cook from comment #13)
> (In reply to David Cook from comment #12)
> > I was thinking about this bug recently. 
> > 
> > I suppose it still won't work for WYSIWYG editors in some cases, but that's
> > not a community concern (yet). I'll have to do some thinking on that one
> > when I have time...
> 
> Oh wait. Liz pointed out that it's on "input" and not on "change".
> 
> It might work for WYSIWYG editors as well! I'll look into this!

So I've been doing lots of research (as I do). 

Locally, I've added TinyMCE to some system preferences which use HTML. (I plan
to upstream it when I find some time.)

I've just been using "keyup" to detect changes to the TinyMCE editor, and then
I trigger a "keyup" on the original textarea so that the "Save..." button
activates.

It works OK for the most part, but I've noticed a few issues like changes from
the editor buttons not being detected or pastes not made through Ctrl+V or
Ctrl+Ins.

Anyway... using "input" for an event listener has been absolutely great with
Firefox and Chrome. It fires for so many different events. It's so awesome!

Unfortunately, IE doesn't support the "input" event for elements that are
"contenteditable". TinyMCE uses a "contenteditable" body element within an
iframe element to create its editor, so IE and TinyMCE are just not going to be
friends with the "input" event. 

But it looks like the "input" event works well with IE otherwise, so yay! 

Just adding this info here in case its somehow relevant to people in the future
(plus it's also just painfully interesting to know).

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list