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 8224839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:12:35+00:00 2026-06-07T15:12:35+00:00

It seems like Jquery dialog is in love with my mouse pointer. I have

  • 0

It seems like Jquery dialog is in love with my mouse pointer.

I have a jqgrid and a few text boxes inside a div which i am using as a dialog.

Whenever i try to move the dialog by dragging, it sticks to the mouse pointer and does not let it go.

here is the code

$("#Applon").dialog({
    autoOpen: false,
    height: 370,
    width: 710,
    modal: true,
    buttons: {
        //'Create an account': function() { },
        Close: function() {
            $(this).dialog('close');
            //$('input:visible:enabled:first').focus();
        }
    },
    close: function() {
    }
});

how do i get around this?

Thanks

EDIT

Also when i open the dialogue, scrollbars appear on my page. when i open the dialog for the second time scrollbars appear on the dialog too.

EDIT 2

here is the grid

jQuery('#jgrid2').jqGrid({
    autowidth: true,
    altRows: true,
    altclass: 'grdAltRwClr',
    datatype: 'local',
    forceFit: true,
    gridview: true,
    mtype: 'post',
    height: 190,
    //width: 350,
    rowNum: 0,
    postData: { p_hdrid: function() { return $('#p_hdrid').val(); } },
    url: window.rootPath + 'Invoice/JGridDtlData',
    beforeSelectRow: function() { return false; },
    gridComplete: function() {
        GridComplete2();
    },
    colModel: [
        { name: 'act', label: 'View', resizable: false, search: false, sortable: false, title: false, width: 8, index: 'act' }
        , { name: 'p_slabid', label: 'Slab ID', width: 15, index: 'p_slabid' }
        , { name: 'p_fslab', label: 'From', width: 15, index: 'p_fslab', sortable: false }
        , { name: 'p_tslab', label: 'Upto', width: 15, index: 'p_tslab', sortable: false }
        , { name: 'p_amt', label: 'Amount', width: 15, index: 'p_amt', sortable: false }

         ]
});

HTML

    <div id="Applon" title="Edit Slab Details" style="border-style: 1px; width: 680px; height:370px; background-color: #00CC99; z-index: 999; display: block; padding-left: 10px;">
    <div class="content">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td>
                <form action="\" id="frmDtl">
                    <table cellpadding="0" cellspacing="0">
                       ....controls go here

                    </table>
                </form>
                </td>

            </tr>
        </table>
    </div>
    <div class="content" style="width: 690px">
        <table id="jgrid2">
        </table>
        <div id="pager2">
        </div>
    </div>

    </div>

Edit:3 Here is the CSS

element.style {
    -moz-user-select: none;
}
.ui-helper-clearfix:after {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
}
jquery...s?v=5.3 (line 12)
.ui-draggable .ui-dialog-titlebar {
    cursor: move;
}
jquery...s?v=5.3 (line 417)
.ui-dialog .ui-dialog-titlebar {
    font-size: 1.1em;
    padding: 2px 2px 2px 10px;
    position: relative;
}
jquery...s?v=5.3 (line 391)
.ui-dialog-titlebar {
    background-color: #5D81AB;
    background-image: url("../../Images/ThkStrip.jpg");
    background-repeat: repeat-x;
}
Sales_...s?v=5.3 (line 1436)
.ui-corner-all {
    border-radius: 6px 6px 6px 6px;
}
jquery...s?v=5.3 (line 282)
.ui-widget-header {
    border: 1px solid #C4D1E7;
    color: #222222;
    font-weight: bold;
}
jquery...s?v=5.3 (line 55)
.ui-helper-clearfix {
    display: block;
}
  • 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-06-07T15:12:37+00:00Added an answer on June 7, 2026 at 3:12 pm

    Here is a working jsfiddle using the code you supplied.

    http://jsfiddle.net/6FWPc/

    This works in both chrome and IE…

    Can you confirm it works for you too?

    EDIT
    As Monkieboy says the mouse up event is happening outside of the browser so until you click again the dialog thinks you are still in the mouse down event.

    All I can think of is making draggable false:

    $("#Applon").dialog({
        autoOpen: false,
        height: 370,
        width: 710,
        modal: true,
        draggable: false,
        buttons: {
            //'Create an account': function() { },
            Close: function() {
                $(this).dialog('close');
                //$('input:visible:enabled:first').focus();
            }
        },
        close: function() {
        }
    

    });

    http://jsfiddle.net/cumsL/

    EDIT 2
    You can use the mouseleave() event to register the mouseup() see fiddle

    $('document').ready(function() {
         $("#main").mouseleave(function()
                               {
                                   $(this).mouseup();
                               });
    });
    

    http://jsfiddle.net/s5D6J/

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

Sidebar

Related Questions

I have the following line of jQuery but it seems like overkill to use
I have a jQuery object which I'd like to pass to jQuery.trigger. The bound
seems like I'm stuck with jQuery tabs. I'm trying to pass selected tab name
Seems like i need some help with a project. I have a routine ,
I'm using the jquery dialog plugin and the default is to have all 4
I really like the looks of jQuery UI and I'd love to integrate it
I would like to have a dialog common to two different call-to-action buttons (row
I try to upload file from Dialog (JQuery UI) window like: $( .selector ).dialog(
I have just started to study jQuery and it seems to be full of
I have what seems like an odd situation here. I'm launching dialogs from a

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.