Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: focus event fires on disabled inputs#5623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ac-mmi wants to merge23 commits intojquery:main
base:main
Choose a base branch
Loading
fromac-mmi:main

Conversation

@ac-mmi
Copy link
Contributor

This PR addresses the issue where calling .focus() on a disabled input still triggers a focus event in jQuery 3.7+, which is inconsistent with native behavior.

Changes Made:

  1. Added a flag in trigger.js to prevent focus events from firing on disabled inputs.
  2. Ensures .focus() on a disabled element does nothing, matching native JavaScript behavior.

Impact:

  1. Fixes an inconsistency without affecting other focusable elements.
  2. No breaking changes.

Fixes#5620

@mgol
Copy link
Member

I’m sorry, I mixed up PRs, let me reopen this one.

I don’t think the changes will be that small, though; we also need to handle at leastblur, get new tests added and clearly state which cases we want to support and which we give up on for now - e.g., there are many quirks withfocus &click propagation in elements inside disabledfieldsets.

@mgolmgol reopened thisFeb 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

focus event fires on disabled inputs

2 participants

@ac-mmi@mgol

[8]ページ先頭

©2009-2025 Movatter.jp