Opened 6 years ago

Closed 6 years ago

#9162 closed bug (worksforme)

Removal of $.ui.isOverAxis() in 1.10 broke tabs.sortable

Reported by: Colin84 Owned by:
Priority: minor Milestone: none
Component: ui.sortable Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

While creating a WordPress plugin in which I implemented jQuery-ui tabs on a component, I wanted to make the tabs sortable so I followed the API documentation and used the code in the demo:

var tabs = $( "#tabs" ).tabs();
tabs.find( ".ui-tabs-nav" ).sortable({
        axis: "x",
        stop: function() {
                tabs.tabs( "refresh" );
        }
});

This causes the following error using jQuery 1.10.0 and up:

Uncaught TypeError: Object #<Object> has no method 'isOverAxis'

It also causes the side effect of the entire tab element section growing vertically when you try to drag a tab. When I revert to version 1.9.2, the tabs sort as expected without any changes to the code. As this removal of $.ui.isOverAxis() was purposeful for some reason as shown in ticket #8891, is there another new way to use sortable with tabs? If so, it needs to be reflected in the API documentation and I was unable to find anything to this effect anywhere in the API or on the internet; if not, isOverAxis() should be added back in as it breaks a core functionality of tabs.

Change History (1)

comment:1 Changed 6 years ago by Scott González

Component: ui.coreui.sortable
Resolution: worksforme
Status: newclosed

Sortable tabs work just fine: http://view.jqueryui.com/1.10.0/demos/tabs/sortable.html

Sounds like you're possibly mixing versions of jQuery UI. Please use the forums or StackOverflow for help. If you can reproduce this using only 1.10.x, then please provide a reduced test case showing the error on jsFiddle or jsbin.

Note: See TracTickets for help on using tickets.