Skip to content

Offset: Fix the offset patch #352

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 15, 2020
Merged

Offset: Fix the offset patch #352

merged 1 commit into from
May 15, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented May 11, 2020

Changes:

  • .offset() works on document.documentElement
  • .offset() setter on an empty object returns the source object, not undefined
  • .offset() setter on a disconnected node returns the source object, not
    { top: 0, left: 0 }

@mgol mgol requested a review from dmethvin May 11, 2020 15:32
Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

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

👍

Changes:
* `.offset()` works on `document.documentElement`
* `.offset()` setter on an empty object returns the source object, not undefined
* `.offset()` setter on a disconnected node returns the source object, not
  `{ top: 0, left: 0}`
@mgol mgol force-pushed the offset-warnings branch from c4bb90c to 2c5751d Compare May 15, 2020 21:56
@mgol mgol merged commit 5d18769 into jquery:master May 15, 2020
@mgol mgol deleted the offset-warnings branch May 15, 2020 22:07
mgol added a commit to mgol/jquery-migrate that referenced this pull request May 16, 2020
`.offset()` in jQuery 3.0.0-3.1.1 sometimes returns an object with more than
just `top` & `left` properties. This was fixed in jQuery 3.2.0. Since we're not
in a business of fixing older jQuery versions here, this commit updates the test
instead.

Ref jquery/jquery#3367
Ref jquerygh-352
@mgol mgol added this to the 3.3.1 milestone May 16, 2020
mgol added a commit that referenced this pull request May 16, 2020
`.offset()` in jQuery 3.0.0-3.1.1 sometimes returns an object with more than
just `top` & `left` properties. This was fixed in jQuery 3.2.0. Since we're
not in a business of fixing older jQuery versions here, this commit updates
the test instead.

Ref jquery/jquery#3367
Ref gh-352
Closes gh-355
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