Autocomplete: Updating position when target is dragged or resized (#6642)#272
Autocomplete: Updating position when target is dragged or resized (#6642)#272TrevorBurnham wants to merge 2 commits intojquery:masterfrom TrevorBurnham:ticket-6642
Conversation
…xed #6642 - autocomplete cannot be used inside a dialog
|
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. |
|
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:
|
|
The bug should definitely not be closed as there are viable solutions, but what equates to essentially hacking autocomplete, is not one of them. |
|
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:
|
|
There's no reason that it should move. If you mousedown to move something, the menu should close. |
Show/Hide API methods Issue fnagel#272. Best Regards.
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
draggableorresizable) that has an autocomplete box attached, the box is left in place (assuming the defaultappendTotarget ofbody).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
dragandresizeevents on theappendTotarget 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.