Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 825585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:16:49+00:00 2026-05-15T03:16:49+00:00

I am trying to disable a sortable element from sorting when it has been

  • 0

I am trying to disable a sortable element from sorting when it has been double clicked. When I try to disable it, even without a condition, it gives me the error ‘this.helper is null’.

$('.roundedBox:first', division).sortable({
    start: function( event, ui ) {
        if( true === true ) {
            $(this).sortable('cancel');
        }

        $(this).parent().data( 'sorting', true ); 
    },
    stop: function() { 
        $(this).parent().data( 'sorting', false ); 
    },
    items: '.department',
    update: function() {},
    placeholder: 'department-placeholder'
})

Any ideas on how I can do this? I don’t need it to be this method. Literally anything thing that stops it will work.

The problem is, sorting starts on a single click, but I have another action bound to double click. If it’s double clicked, I don’t want it to drag.


EDIT

After further investigation sparked by Russ C (thank you), I discovered that the problem is not in the sortable itself, but in combination with two other plugins:

jEditable (http://www.appelsiini.net/projects/jeditable)
jQuery Context Menu (http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/)

The latter is what actually causes the problem. Because the jEditable h3 tag is within a sortable div, which in turn is within a division that has the jQuery Context Menu, which I believe is doing something to stop the propagation (without this last plugin, everything works fine).

To reproduce the problem the following is needed:

HTML

<div class="division">
    <div class="roundedBox">
        <div class="department" id="dDeppresident_test">
            <h3>Test</h3>
            <a href="#" title="Menu" class="icon menu hover-icon"><img src="/images/icons/menu-colored.png" alt="Menu" height="15" width="15"></a>
        </div>
    </div>
</div>

<ul id="uDepartmentMenu" class="hidden contextMenu">
    <li><a href="#editDepartment" class="edit" title="Edit Department">Edit Department</a></li>
    <li><a href="#removeDepartment" class="remove" title="Remove Department">Remove Department</a></li>
</ul>
<ul id="uDivisionMenu" class="hidden contextMenu">
    <li><a href="#editDivision" class="edit" title="Edit Division">Edit Division</a></li>
    <li><a href="#addDivision" class="add" title="Add Division">Add Division</a></li>
    <li><a href="#removeDivision" class="remove" title="Remove Division">Remove Division</a></li>
    <!--<li><a href="#move" title="Move Division">Move Division</a></li>-->
    <li class="separator"><a href="#addDepartment" class="add" title="Add Department">Add Department</a></li>
</ul>

jQuery

// Add context menu to menu icon
$('.division').contextMenu({
    menu: 'uDivisionMenu'
}, function(){} );

// Add Sorting
$('.roundedBox').sortable({
    start: function( event, ui ) {
        //$(this).parent().data( 'sorting', true ); 
    },
    stop: function() { 
        //$(this).parent().data( 'sorting', false ); 
    },
    items: '.department',
    update: function() {},
    placeholder: 'department-placeholder'
});


// Make the division names editable
$('.department h3').editable( '/ajax/save-department-name.php', {
    indicator   :   'Saving...',
    tooltip     :   'Double click to edit...',
    event       :   'dblclick'
});

// Add context menu to menu icon
$('.department a.menu').contextMenu({
    menu: 'uDepartmentMenu', 
    leftButton: true
}, function(){} );

// Make the departments show remove icon when you hover it
$('.department').live( 'mouseover', function() {
    $( '.hover-icon', $(this) ).show();
}).live( 'mouseout', function() {
    $( '.hover-icon', $(this) ).hide();
});

You can see a testing example here (link will be removed at a later date):
http://www.realstatistics.com/testing/

If you remove this section from the jQuery code, all works well:

// Add context menu to menu icon
$('.division').contextMenu({
    menu: 'uDivisionMenu'
}, function(){} );

I will continue searching for a problem for now.


UPDATE

I have fixed this problem. If anyone runs into this issue in the future, I changed the contextMenu plugin to skip its check if the target was on the “.department” class. Right after the “mouseup” function, add a check that checks the event target, like the following:

$(this).mouseup( function(e) {
    if( !$(e.target).hasClass('department') && !$(e.target).parent().hasClass('department') ) {
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:16:49+00:00Added an answer on May 15, 2026 at 3:16 am

    Can you try adding a delay:500 to the sortable parameters list, perhaps that delay might make the double click bubble properly ?

    Similarly, you can use distance:30 which will tell sortable not to start working until the drag has gone on for 30 pixels or more. this can be used to make sure that ‘click’ events work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to disable log output from all external libraries in logback-test.xml. Somehow it
I'm trying to disable sortablerows functionality from a grid. I'd like to have the
I am trying to disable the save image dialoge from showing on the iPhone/any
I've been trying to disable DEP on my windows 2008 dev box and have
I'm trying to disable double clicks on buttons and currently the only way I
I'm trying to disable a button after it's clicked. I have tried: $(#ajaxStart).click(function() {
I'm trying to disable a label control from the CheckedChanged event handler of a
I am trying to disable UITextField from opening the keyboard but I am having
In the following code, I have been trying to disable the entry1 widget every
trying to disable two html.Textboxfor field on condition.Not working .Looks like syntax issue. $(document).ready(function()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.