Skip to content

Offset: Don't warn against usage on disconnected elements #359

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented May 18, 2020

The initial decision to not support disconnected elements as input to the
.offset() getter was reversed after feedback from jQuery UI (see jquery/jquery#2310).
Since jQuery now ensures disconnected element get { left: 0, top: 0 } from
this method via unit tests it doesn't make sense to warn against such usage.

This change is the only remaining one in Migrate & UI that's required for UI
to trigger no Migrate warnings when running its test suite.

Ref jquery/jquery#2310
Ref jquery/jquery#2396

The initial decision to not support disconnected elements as input to the
`.offset()` getter was reversed after feedback from jQuery UI (see gh-2310).
Since jQuery now ensures disconnected element get `{ left: 0, top: 0 }` from
this method via unit tests it doesn't make sense to warn against such usage.

This change is the only remaining one in Migrate & UI that's required for UI
to trigger no Migrate warnings when running its test suite.

Ref gh-2310
Ref gh-2396
@mgol mgol added this to the 3.3.1 milestone May 18, 2020
@mgol mgol requested a review from dmethvin May 18, 2020 21:57
@mgol mgol merged commit dc26258 into jquery:master May 20, 2020
@mgol mgol deleted the offset-warnings-lax branch May 20, 2020 06:37
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.

2 participants