Skip to content

Fix: JQuery .proxy deprecated and QMIGRATE: Boolean attribute 'disabled' is not set to its lowercased name in Jquery 4.0 - #10661

Closed
hbhalodia wants to merge 2 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-64425
Closed

Fix: JQuery .proxy deprecated and QMIGRATE: Boolean attribute 'disabled' is not set to its lowercased name in Jquery 4.0#10661
hbhalodia wants to merge 2 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-64425

Conversation

@hbhalodia

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/64425

  • Updated attr to use prop.
  • Use bind instead of proxy with a comment to update the function used with namespace.

This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props hbhalodia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copilot AI review requested due to automatic review settings July 25, 2026 03:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates WordPress Media UI button disabling logic to align with jQuery 4.x boolean attribute behavior by using .prop( 'disabled', ... ) instead of .attr( 'disabled', ... ), preventing boolean-attribute migration warnings and ensuring correct disabled state handling on <button> elements.

Changes:

  • Switch wp.media.view.Button rendering to set disabled via .prop() instead of .attr().
  • Switch the cropper toolbar “Insert/Crop” button to disable via .prop() instead of .attr().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/js/media/views/button.js Uses .prop( 'disabled', … ) when rendering media buttons to correctly reflect boolean disabled state.
src/js/media/controllers/cropper.js Uses .prop( 'disabled', true ) when disabling the crop action button during processing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

pento pushed a commit that referenced this pull request Aug 1, 2026
Under jQuery 4.0, disabling a media button or the image cropper's action button triggered a jQuery Migrate warning about the boolean `disabled` attribute. These buttons now toggle the `disabled` property instead, which removes the warning and keeps the behavior unchanged.

Developed in: #10661

Props audrasjb, azaozz, hbhalodia, neo2k23, wildworks.
See #64425.

git-svn-id: https://develop.svn.wordpress.org/trunk@62963 602fd350-edb4-49c9-b593-d223f7449a82
@t-hamano

t-hamano commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@t-hamano t-hamano closed this Aug 1, 2026
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Aug 1, 2026
Under jQuery 4.0, disabling a media button or the image cropper's action button triggered a jQuery Migrate warning about the boolean `disabled` attribute. These buttons now toggle the `disabled` property instead, which removes the warning and keeps the behavior unchanged.

Developed in: WordPress/wordpress-develop#10661

Props audrasjb, azaozz, hbhalodia, neo2k23, wildworks.
See #64425.
Built from https://develop.svn.wordpress.org/trunk@62963


git-svn-id: http://core.svn.wordpress.org/trunk@62204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants