NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 458 forks source link

jQuery Migrate plugin warnings #211

Closed gabrielweyer closed 4 years ago

gabrielweyer commented 4 years ago

Description

I'm using the jQuery Migrate plugin to be able to migrate to jQuery 3.4.1 over time. This plugin displays warnings in the console for jQuery features that have been and will be removed.

jquery-jeditable is using some features that will be deprecated:

The solutions to address the warnings are listed at jQuery Migrate Plugin - Warning Messages.

How to reproduce

The below pen exhibits the issue:

https://codepen.io/gabrielweyer/pen/vYEYQYR

Expected result

No warnings are displayed by jQuery Migrate.

Actual result

Note: I'm running against jquery-jeditable 2.0.13 unminified.

Warnings are displayed by jQuery Migrate.

image

image

Environment

jQuery version: 3.4.1 Browser: Chrome version 78.0.3904.108 (Official Build) (64-bit) OS: Windows 10 fully patched

NicolasCARPi commented 4 years ago

Hello,

Thank you for reporting this issue.

jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos and jQuery.expr.filters is deprecated; use jQuery.expr.pseudos are coming from jquery-ui and it's already the latest version.

I could resolve the bind issue and two click, but don't know why this one is still showing: jQuery.fn.click() event shorthand is deprecated...

gabrielweyer commented 4 years ago

The fix for the click looks good to me.

NicolasCARPi commented 4 years ago

I've just pushed a commit with those changes.

gabrielweyer commented 4 years ago

Thank you. I tested the changes and can confirm the migration warnings are gone.

NicolasCARPi commented 4 years ago

ok I'll publish a patch then.

gabrielweyer commented 4 years ago

Thank you for addressing this promptly 👍 .

JamoCA commented 4 years ago

I'm using v2.0.14 and notice JQMigrate warnings regarding the deprecated blur() event after clicking on an element to edit.

JQMIGRATE: jQuery.fn.blur() event shorthand is deprecated

NicolasCARPi commented 4 years ago

@JamoCA Thanks for the report. I have pushed a change on the experimental branch. Could you please try it out?

JamoCA commented 4 years ago

This update appears to be good. I didn't receive any console warnings and the editing was cancelled when the focus was lost.

NicolasCARPi commented 4 years ago

Ok, a new version has been released with this patch.