Skip to content

Resizable: Remove bad workaround for draggable+resizable #1210

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
Apr 16, 2014
Merged

Resizable: Remove bad workaround for draggable+resizable #1210

merged 1 commit into from
Apr 16, 2014

Conversation

jzaefferer
Copy link
Member

This adds a compound test page for draggable+resizable, which had no coverage
before. Using that page shows that there is no way to reproduce the behaviour
described in the original ticket that caused this workaround, since its not
possible to resize an element beyond the window boundaries. Therefore removing
the workaround, which is 6+ years old and has no test coverage, seems like the
sanest approach.

Fixes #6939

minHeight: 13,
handles: "s"
});
$(".draggable:last").addClass("absolute");
Copy link
Member

Choose a reason for hiding this comment

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

spacing

@tjvantoll
Copy link
Member

Other than the minor spacing comments I think this looks good. I see no reason for that workaround to remain in place.

@mikesherov
Copy link
Member

Is there a unit test that can cover this change?

@jzaefferer
Copy link
Member Author

I've fixed the spacing issues.

I've looked through the existing unit tests for resizable. There's nothing testing draggable+resizable, and I couldn't find a test for the absolute positioning. I guess we'd need a test that verifies the position of the handles after a resize. None of the existing tests seem to do that. Does that make sense?

@mikesherov
Copy link
Member

Right, none of the tests do that (resizable's suite sucks, as do the other interactions besides draggable), so let's add one :-)

@jzaefferer
Copy link
Member Author

Just updated this, extending the one unit test that actually used absolute positioning. I added a check for the position of the handle after resizing. After I added that test, I checked what happens if I remove the workaround altogether and the test still passed. I then checked my visual test page again and its also working fine. I can't reproduce the issue I thought I saw earlier, therefore removed the workaround completely.

Ran the updated tests through our 12 supported browsers through browserstack-runner, all passed. Doesn't mean much given the resizable testsuite, but at least there's no regression here.

Thoughts?

@scottgonzalez
Copy link
Member

Considering that no workaround is necessary at all, do you think we need the new visual test page?

@jzaefferer
Copy link
Member Author

I still think the visual test page is useful, since we have nothing else that tests the combination of draggable and resizable.

@scottgonzalez
Copy link
Member

I guess this is good to land then.

This adds a compound test page for draggable+resizable, which had no coverage
before. Using that page shows that there is no way to reproduce the behaviour
described in the original ticket that caused this workaround, since its not
possible to resize an element beyond the window boundaries. Therefore removing
the workaround, which is 6+ years old and has no test coverage, seems like the
sanest approach.

Fixes #6939
Closes gh-1210
@jzaefferer jzaefferer merged commit 3576ceb into jquery:master Apr 16, 2014
@jzaefferer jzaefferer deleted the drag-resize-relative-position branch April 16, 2014 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants