Skip to content

Conversation

tjvantoll
Copy link
Member

I manually verified this works and doesn't regress #4261 in IE 8, 9, 10, 11, and Chrome. I'm having a hell of a time writing a test for this though. The existing test for #4261 passes in all the IEs.

cc @mikesherov

@mikesherov
Copy link
Member

Why can't this be unit tested? Seems like a pretty important thing to test.

ui/draggable.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

combine this conditional with the one below it to reduce nesting level.

Copy link
Member Author

Choose a reason for hiding this comment

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

I split them up to make it clear that the Support comment only applied to that check. But if I combine the comments on lines 133 and 134 I think it should be clear enough.

Copy link
Member

Choose a reason for hiding this comment

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

Good point about comment. Then perhaps instead you can make the new check be a guard clause even before the try.

@mikesherov
Copy link
Member

Ah, I just saw that the test seems hard. I'll like to take a crack at it if you can't get a suitable one going because I think it's important this not regress again.

@mikesherov
Copy link
Member

I can confirm that in the test for the blur behavior, if you switch the input to a <div tabindex=-1>, and append it to the draggable, and simulate a drag on it, you can get a red/green test. Didn't test it on ie8 though. Lemme know if that works.

@tjvantoll
Copy link
Member Author

The <div> did make this a lot easier to test. I tested in Chrome and all the IEs, so hopefully this is good to go.

@mikesherov
Copy link
Member

@tjvantoll actually, there's another bug! I found it during testing. I'm opening a separate PR with your change and mine. We also needed to prevent focus on mouseup for the same thing.

@mikesherov
Copy link
Member

@mikesherov
Copy link
Member

@tjvantoll also, thanks again for sticking with this. I really appreciate your diligence.

@tjvantoll
Copy link
Member Author

Closing in favor of #1315.

@tjvantoll tjvantoll closed this Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants