Bugzilla – Attachment 77390 Details for
Bug 21131
Changing and restoring a WYSIWYG preference can result in unexpected behaviour
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour
Bug-21131-Remove-the-TinyMCEisDirty-check-that-cau.patch (text/plain), 2.68 KB, created by
Katrin Fischer
on 2018-08-01 17:51:18 UTC
(
hide
)
Description:
Bug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-08-01 17:51:18 UTC
Size:
2.68 KB
patch
obsolete
>From abcd0cdc3044a4c705236caa32945ddee64287c3 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 30 Jul 2018 14:35:40 +1000 >Subject: [PATCH] Bug 21131: Remove the TinyMCE.isDirty() check that caused > unexpected behaviour > >When using the WYSIWYG editor for system preferences, the editor only >updates the textarea element if the content is different from the >original content. This means if you change a system preference and >then change it back to the original content, the textarea will have >the 2nd last change you made. > >This patch removes the TinyMCE.isDirty() check, which was responsible >for comparing the original and changed content. Every input/keydown/dragend >or TinyMCE command will cause the textarea element to be updated and >trigger the input event which causes the "modified" class to be added >to the element, so that the system preference can be saved. > >__TEST PLAN__ > >_Before applying_ >0. Change "UseWYSIWYGinSystemPreferences" to "Show" >1. Change "opaccredits" to "123a" >2. Click "Save all OPAC preferences" >3. Reload the page >4. Change "opaccredits" to "123" >5. Change "opaccredits" to "123a" >6. Click "Save all OPAC preferences" >7. Reload the page >8. Note that "opaccredits" says "123" > >_Apply the patch_ > >_After applying_ >1. Change "opaccredits" to "123a" >2. Change "opaccredits" to "123" >3. Click "Save all OPAC preferences" >4. Reload the page >5. Note that "opaccredits" says "123" (and not "123a") >6. Change "opaccredits" to "1234" >7. Click "Save all OPAC preferences" >8. Reload the page >9. Note that "opaccredits" says "1234" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc >index b2d3fe5..5dcd1cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc >@@ -31,17 +31,13 @@ tinyMCE.init({ > -%] > > tinyMCE.dom.Event.bind(editor.getBody(), 'input keyup dragend', function(e){ >- if (ed.isDirty()){ >- wysiwyg_change(ed); >- } >+ wysiwyg_change(ed); > }); > }); > > // Register change when TinyMCE command returns isDirty() > ed.onExecCommand.add(function(ed, cmd, ui, val) { >- if (ed.isDirty()){ >- wysiwyg_change(ed); >- } >+ wysiwyg_change(ed); > }); > > }, >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21131
:
77322
|
77389
| 77390