Problem/Motivation

Filter tips are associated with the text format, but this is not getting updated when the text format change is canceled.
Steps to reproduce:

  1. I added new text format called Filtered HTML and selected Text Editor none.
  2. There was Rich text format which was available out of the box with Text Editor selected as CKEditor.
  3. Go to node add page which has Body Field or any field which has field type Text (formatted, long, with summary)
  4. Now add some text in the body field when the text format is Filtered HTML
  5. Change the Text format to Rich Text, and modal popup will appear.
  6. Click on Cancel button in the modal popup.
  7. Now you will noticed that Text Format is Filtered HTML but it's tips disappaears. This is an issue.

Expected behavior:
Tips associated with text format should appear even if the text format switching is canceled.

Note: Refer attached screencast for reproducing the bug.

Proposed resolution

Trigger a change event to the select box when clicking the cancel button

Comments

dishabhadra created an issue. See original summary.

dishabhadra’s picture

Assigned: dishabhadra » Unassigned
Status: Active » Needs review
StatusFileSize
new1.06 KB

This patch should fix the issue.

dishabhadra’s picture

Issue summary: View changes
sheldonreed3’s picture

Version: 8.8.5 » 10.0.x-dev

The patch in #2 is working for me though I am concerned about the UX. The tip switches when the new format is selected while the modal is open. If cancelled, it reverts. This fixes the issue, but preventing the tip from switching before the change is accepted/canceled would be ideal.

priyanka.sahni’s picture

Assigned: Unassigned » priyanka.sahni
priyanka.sahni’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new9.41 MB
new97.1 KB
new80.32 KB

I have verified and test by applying the patch #2 , it looks good to me.Moving it to RTBC.

@sheldonreed3 As per #4 , i guess the tip should be there even if we from switching before the change is accepted/canceled.

Steps to test -
1. Go to the admin site.
2. Go to admin/config/content/formats.
3. Go to node/add/page.
4. In the body field , change the text format to Restricted Html to the Full html.
5. Again change from full html to Restricted Html.
6. Enter text in the body field.
7. Again change the text format to Restricted Html to the Full html.
8. Pop-up appears click cancel on it.
9. Verify the tips remain there under the body field.

After Patch

After Patch

priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned
catch’s picture

Version: 10.0.x-dev » 8.9.x-dev

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: tips_disappear-3136459-2.patch, failed testing. View results

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nikhil_110’s picture

StatusFileSize
new577 bytes

Attached patch against drupal 9.5.x

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new1.03 KB

I have attached a patch for 9.5 please review

smustgrave’s picture

Version: 9.5.x-dev » 11.x-dev
Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests

Will also so need a 11.x patch.

As a bug will need a test case.

ranjith_kumar_k_u’s picture

Issue summary: View changes
StatusFileSize
new1.13 KB
new1.66 KB

Added tests, please review

ranjith_kumar_k_u’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests +Needs followup

Confirmed the bug in the issue summary and that the patch fixes it.

Think a follow up should be opened though as when you change the formatter the tool tips go away when the modal is up. Think it shouldn't disappear at all. But this does make it better.

The last submitted patch, 15: 3136459-15.patch, failed testing. View results

  • longwave committed 5a47e624 on 10.1.x
    Issue #3136459 by ranjith_kumar_k_u, dishabhadra, Gauravvvv, priyanka....

  • longwave committed 44cc4df7 on 11.x
    Issue #3136459 by ranjith_kumar_k_u, dishabhadra, Gauravvvv, priyanka....
longwave’s picture

Version: 11.x-dev » 10.1.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: +ddd2023

Backported to 10.1.x as a low risk bug fix.

Committed and pushed 44cc4df762 to 11.x and 5a47e6241d to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.