Problem/Motivation

It appears that a jQuery.fn.removeOnce function was not removed in the webform.element.managed_file.js file on line 73 when issue #3295609 was addressed. This function causes a console error when you use a file input.

Steps to reproduce

Create a webform with a file input.
Open the form
Looks at the browser console to see the error.

Proposed resolution

I would like to propose replacing this function with the once.remove function. ie

const removedElements = once.remove('webform-auto-file-upload', 'input[type="file"]', context);

Issue fork webform-3335861

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rymcveigh created an issue. See original summary.

rymcveigh’s picture

Status: Active » Needs review

I created an MR where I replace the removeOnce with the new once API function.

jrockowitz made their first commit to this issue’s fork.

  • jrockowitz committed ecc9a7a3 on 6.2.x authored by rymcveigh
    Issue #3335861 by rymcveigh: [Drupal 9.2.x] Replace jquery.removeOnce...
jrockowitz’s picture

Status: Needs review » Fixed
greggles’s picture

Thanks for the quick review and merge!

Status: Fixed » Closed (fixed)

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