Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Droppable: Fixes: Ticket #8060. Over event is not fired correctly in a droppable. #583

Closed
wants to merge 1 commit into from

2 participants

Nicolás Hatcher Andrés Mike Sherov
Nicolás Hatcher Andrés

jquiery.ui.droppable

this.over should change in a drop event even if the draggable is not accepted.

Mike Sherov
Collaborator

Hi @nhatcher, thanks again for contributing this patch. We recently re-enabled the test suite for droppable. In order for us to land this patch, we'd need a few tests added to the test suite proving this doesn't break existing functionality and also that it fixes the bug as described. Can you add some tests here please?

Mike Sherov
Collaborator

@nhatcher, have you had a chance to look into adding tests for this pull request?

Mike Sherov
Collaborator

Thanks again for contributing! Actually, this works as expected per the documentation. From http://api.jqueryui.com/droppable/#event-over: "Triggered when an accepted draggable is dragged over the droppable (based on the tolerance option)." For that reason, I'm going to close this.

Just because this didn't get merged, that doesn't mean you shouldn't try contributing another patch! There's tons of open bugs to work on over at: http://bugs.jqueryui.com/query?status=open&type=bug&group=component&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority&report=31

Thanks again!

Mike Sherov mikesherov closed this
Nicolás Hatcher Andrés

Hi @mikesherov, thank you very much for taking your time in reviewing the pull request and the encouragement. Unfortunately, I will not have a chance until the end of the year to have a look at this issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 26, 2012
  1. Nicolás Hatcher Andrés

    Droppable: this.over is changed even for non acceptable draggables. F…

    nhatcher authored
    …ixes Ticket #8060. Over was not fired correctly.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/jquery.ui.droppable.js
5 ui/jquery.ui.droppable.js
View
@@ -226,9 +226,10 @@ $.ui.ddmanager = {
if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
dropped = this._drop.call(this, event) || dropped;
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if (!this.options.disabled && this.visible) {
this.isout = 1; this.isover = 0;
- this._deactivate.call(this, event);
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element)))
+ this._deactivate.call(this, event);
}
});
Something went wrong with that request. Please try again.