Skip to content
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

Autocomplete: Updating position when target is dragged or resized (#6642) #272

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
2 participants
@TrevorBurnham
Copy link

commented May 13, 2011

Test case can be found at http://bugs.jqueryui.com/ticket/6642. Current behavior is that when you move or resize a dialog (or any other draggable or resizable) that has an autocomplete box attached, the box is left in place (assuming the default appendTo target of body).

People at that ticket proposed hiding the autocomplete box during such events. However, I think the most desirable behavior is for the box to move along with its target. This patch adds a listener for drag and resize events on the appendTo target to allow the autocomplete box to recalculate its position and z-index during such events. (There is a timeout of 0 because the target element's new position is only available after the event.)

Seems to work quite well in testing; however, this is my first time working with the jQueryUI source, so please let me know if I've done anything horribly wrong.

@scottgonzalez

This comment has been minimized.

Copy link
Member

commented May 14, 2011

Thanks for your patch, but we don't allow plugins to interact with or respond to something other plugins may do unless the plugin is designed specifically for use with the other plugin.

@TrevorBurnham

This comment has been minimized.

Copy link
Author

commented May 14, 2011

Sounds to me like the only option is to close 6642 as "wontfix," then. Or trigger a blur whenever a widget is dragged or resized (which would be undesirable in many cases).

On May 14, 2011, at 10:49 AM, scottgonzalezreply@reply.github.com wrote:

Thanks for your patch, but we don't allow plugins to interact with or respond to something other plugins may do unless the plugin is designed specifically for use with the other plugin.

Reply to this email directly or view it on GitHub:
#272 (comment)

@scottgonzalez

This comment has been minimized.

Copy link
Member

commented May 14, 2011

The bug should definitely not be closed as there are viable solutions, but what equates to essentially hacking autocomplete, is not one of them.

@TrevorBurnham

This comment has been minimized.

Copy link
Author

commented May 14, 2011

Well, if the autocomplete is appended to the document body, then how can it move to correspond with a draggable's movement, without listening to the drag event?

On May 14, 2011, at 12:52 PM, scottgonzalezreply@reply.github.com wrote:

The bug should definitely not be closed as there are viable solutions, but what equates to essentially hacking autocomplete, is not one of them.

Reply to this email directly or view it on GitHub:
#272 (comment)

@scottgonzalez

This comment has been minimized.

Copy link
Member

commented May 16, 2011

There's no reason that it should move. If you mousedown to move something, the menu should close.

demonslord referenced this pull request in demonslord/jquery-ui Feb 21, 2013

Show/Hide API methods
Show/Hide API methods

Issue fnagel#272.

Best Regards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.