taqueci / redmine_wysiwyg_editor

Redmine WYSIWYG Editor plugin
GNU General Public License v2.0
114 stars 27 forks source link

Can't delete all text with visual editor #182

Open skalimer0 opened 7 months ago

skalimer0 commented 7 months ago

Hello

For example : If we delete all text in textile tab and save issue : the field is empty If we delete all text in visual tab and save issue : the field is not saved and content old value.

It's on _setTextContent methods on redmine_wysiwyg_editor.js file.

the test if (html) is false if the textarea is empty.

No test is need here to delete all text in a field with visual editor.

Thanks.

taqueci commented 7 months ago

Hi @skalimer0

Could you please tell me your environment information? (Administration » Information)

skalimer0 commented 7 months ago

Hello,

I have redmine 4.2 under windows (for test) and redhat for Prod. Afterwards, I think this problem is a side effect of this commit: https://github.com/taqueci/redmine_wysiwyg_editor/pull/148

Environment: Redmine version 4.2.11.stable Ruby version 2.5.9-p229 (2021-04-05) [x86_64-linux] Rails version 5.2.8 Environment production Database adapter PostgreSQL Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Subversion 1.10.2 Git 2.31.1 Filesystem
Redmine plugins: additionals 3.0.3 computed_custom_field 1.0.7 redmine_wiki_extensions 0.9.2 redmine_wiki_html_util 0.0.1 redmine_wiki_issue_fields 0.6.1 redmine_workflow_hidden_fields 0.5.0 redmine_wysiwyg_editor 0.31.0 view_customize 2.8.1