Steps to reproduce

  1. Create a formatted text field with a maxlength
  2. Enable Force truncate and Safe truncate html
  3. Use an unordered list to reach the character limit

The field will continue to gain and lose focus, flashing repeatedly.

Proposed solution

Seems like the issue is how WYSIWYG treats new lines. Wysiwyg will by default convert \r\n to \n when being inserted into wysiwyg. Not sure why we want to enforce \r\n for as a new line in the JS. We need to make some handling of this or change this behavior altogether

CommentFileSizeAuthor
#2 2932007-2.patch1.52 KBgoogletorp

Comments

googletorp created an issue. See original summary.

googletorp’s picture

Status: Active » Needs review
StatusFileSize
new1.52 KB

Patch with fix. This might require specific markup in the WYSIWYG to be an issue, I've seen this be an issue when reaching max char when creating an unordered list.

cedewey’s picture

Title: Maxlength disables WYSIWYG fields when max is reached » Maxlength disables WYSIWYG fields when max is reached using an unordered list
Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

I've tested this and it does indeed resolve the issue. I'm marking this RTBC and will have a developer double check the code before quality before committing.

I've also updated the title for clarity.

cedewey’s picture

cedewey’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

hipp2bsquare’s picture

Status: Reviewed & tested by the community » Fixed

Nice work, Jakob. At long last, we've committed your patch to the project. Thank you!

Status: Fixed » Closed (fixed)

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