Problem/Motivation

We don't really need to use jQuery anymore. Modern JS has evolved a lot, making it relatively easy to remove the dependency.

This way we future proof ourselves for the broader push to remove jQuery from Drupal as a whole, see #3052002: [meta] Replace JQuery with vanilla Javascript in core for that.

Proposed resolution

Replace jQuery with vanilla JS

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

joris handstanger created an issue. See original summary.

jhandsta’s picture

Version: 8.x-1.x-dev » 2.x-dev
Assigned: Unassigned » jhandsta

jhandsta’s picture

Status: Active » Needs review
Issue tags: -JavaScript +JavaScript

I have refactored the JS to get rid of the jquery dependency.
I have also removed the logic determining the size of the editor in favor of some CSS, as this functions better when resizing the browser.

robindh’s picture

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

Did a quick test on a relatively empty drupal 11.3.5 install. Both front-end live css and admin theme live css still work as expected + viewport resizing issues are fixed. Moving to RTBC

  • jhandsta committed 2b14496c on 2.x
    fix: #3552558 Replace jQuery with vanilla JS
    
    By: jhandsta
    By: robindh
    
jhandsta’s picture

Assigned: jhandsta » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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