- Issue created by @acemichael
- 🇺🇸United States cedewey Denver, CO
Thanks for reporting this issue acemichael,
I can reproduce this issue as well.
A workaround is to save the form, edit it again and the MaxLength functionality begins working again.
I'm going to update this to be a 3.x-dev issue since that is the new version we will be actively maintaining.
- First commit to issue fork.
- Merge request !44Issue #3391779: Re-attach maxlength counter behavior after text format change. → (Merged) created by godotislate
- last update
8 months ago 5 pass - Status changed to Needs review
8 months ago 9:12pm 21 March 2024 I put in an MR for a change that worked for me:
Testing steps:
1. Installed Drupal core with standard profile (10.3.x)
2. Installed MaxLength 3.0.0-beta1
3. Configured article content type's body field widget to have a maxlength
4. Created a new article node
5. Typed some text into body field (format initially Basic HTML) and confirmed counter matches typing
6. Switched formats to Full HTML and confirmed via dialog
7. Resumed typing and confirmed counter still matches characters typed.The fix is slightly ugly with the use of the MutationObserver. I think it can be cleaned up once ✨ Trigger event when Text Editor is attached Needs work in Drupal core is in, and there's event that can be listened for instead.
Going to put in needs review for feedback, though it probably needs tests.
- last update
8 months ago 5 pass - Status changed to Needs work
8 months ago 10:23am 25 March 2024 - 🇧🇪Belgium joevagyok
Thank you for the contribution! Would be nice to see a test for this without the solution to validate the issue and in a new commit adding the fix should make the test pass.
- last update
8 months ago 4 pass, 2 fail - last update
8 months ago 5 pass - Status changed to Needs review
8 months ago 5:50pm 28 March 2024 Added test.
Failing test-only commit job: https://git.drupalcode.org/issue/maxlength-3391779/-/jobs/1182561
Fixed job: https://git.drupalcode.org/issue/maxlength-3391779/-/jobs/1182625- Assigned to joevagyok
- last update
7 months ago 5 pass - Status changed to RTBC
6 months ago 11:00am 29 May 2024 - Status changed to Fixed
6 months ago 2:29pm 29 May 2024 -
joevagyok →
committed ae05ef1d on 3.x authored by
godotislate →
Issue #3391779: Re-attach maxlength counter behavior after text format...
-
joevagyok →
committed ae05ef1d on 3.x authored by
godotislate →
Automatically closed - issue fixed for 2 weeks with no activity.