TypeError inputTypes contains (special characters)

Created on 17 October 2023, about 1 year ago
Updated 19 December 2023, 12 months ago

Problem/Motivation

When inserting a special character (? for example), I'm receiving an error the the devtools console.

Steps to reproduce

Create a paragraph with a text field. Add the paragraph to the page using the mercury editor. Type "test?" into the textfield and look in your devtools console.

UI Replication

Devtools error

File with error

🐛 Bug report
Status

Closed: won't fix

Version

2.1

Component

Code

Created by

🇺🇸United States jsheffers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jsheffers
  • 🇮🇳India SandeepSingh199

    Hi @jsheffers, I followed your steps & unable to replicate the issue in drupal9.5. Can you please tell, which drupal version are you using ?
    Attached a screenshot

  • 🇺🇸United States jsheffers

    10.1.5

  • 🇺🇸United States jsheffers

    Confirmed this happens on multiple themes (my custom theme, and Olivero)

  • Status changed to Closed: won't fix about 1 year ago
  • 🇺🇸United States pixelwhip

    I don't think this code is coming from Mercury Editor.

    The error in the screenshot says contains is not a function which is true. There is no native contains method on an Array in JS. From the code, it looks like contains() should be includes().

    I did a search through the codebase and couldn't find this code anywhere in the module so it must be coming from another theme, module or 3rd party script.

  • 🇺🇸United States jsheffers

    I narrowed this down to not passing attributes through the paragraph twig template. Not sure exactly where it's coming from, but if the attributes are passed properly, the issue goes away.

Production build 0.71.5 2024