Skip to content

Event: fixing incorrect window bug with scrollTop/Left in iframes #1959

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

Closed
wants to merge 1 commit into from

Conversation

araghava
Copy link
Contributor

The iframe was getting the parent window's value for pageXOffset and pageYOffset, see #1945.

@jxnl
Copy link

jxnl commented Dec 21, 2014

💛

@@ -531,4 +531,19 @@ test("fractions (see #7730 and #7885)", function() {
div.remove();
});

test("iframe scrollTop/Left (see #1945)", function() {
expect( 2 );
Copy link
Member

Choose a reason for hiding this comment

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

This could be moved to test declaration, like so:

test("iframe scrollTop/Left (see #1945)", 2, function() {

Choose a reason for hiding this comment

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

That's not recommended: qunitjs/qunit#356

Copy link
Member

Choose a reason for hiding this comment

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

Not yet, but that is the news either way.

@jzaefferer, @Krinkle is that still something your planning to do?

Copy link
Member

Choose a reason for hiding this comment

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

Regardless of what's the resolution of qunitjs/qunit#356, I agree with this comment from @jzaefferer: using expect makes the intention explicit so I like it better.

Copy link
Member

Choose a reason for hiding this comment

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

Let's not fixate on subjective opinions, everybody has one whereas those discussions are always exhausting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this PR, then, can we agree to leave it as is?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, but i still would like to hear someone from qunit team

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that ticket should've been closed as fixed, along with follow up tickets for removal. See also http://qunitjs.com/upgrade-guide-2.x/

In this case, keep calling expect, and switch to assert.expect some time.

Copy link
Member

Choose a reason for hiding this comment

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

Aim for consistency with the surrounding code first and foremost. We'll switch to something when we switch to it, in a dedicated commit.

Copy link
Member

Choose a reason for hiding this comment

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

@Krinkle i'd would appreciate, if you comment only if you have something to say i.e. without meaningless tautology

@araghava araghava force-pushed the fix-scroll-reset-bug branch from 4f35f25 to 3fd7134 Compare December 21, 2014 21:52
@dmethvin
Copy link
Member

This LGTM as is, I think we want to stay with expect() to blend in with the surrounding code until we move to QUnit 2.0 style.

@markelog
Copy link
Member

@araghava could sign your commit with your real name? After that, we will able to land this.

@araghava araghava force-pushed the fix-scroll-reset-bug branch from 3fd7134 to 25c7c6f Compare December 23, 2014 20:30
@araghava
Copy link
Contributor Author

@markelog signed with real name

@markelog markelog closed this in d21edb5 Dec 23, 2014
@markelog
Copy link
Member

@dmethvin hm, just realized, this commit has "Event" as a module for some reason

@araghava
Copy link
Contributor Author

Right sorry this should have been under 'Offset:' I believe.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

8 participants