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

  • SEARCH
  • Home
  • 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 8723027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:32:14+00:00 2026-06-13T07:32:14+00:00

A jQuery UI ‘dblclick’ event fails to fire unless the web page is scrolled

  • 0

A jQuery UI ‘dblclick’ event fails to fire unless the web page is scrolled down a small amount from the top. Scrolling down allows the event to be fired but scrolling back to the top of the page reintroduces the issue.

<!DOCTYPE HTML>
<html>
<head>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
    <style>
        #selectableTiles .ui-selected
        {
            background: black;
            color: white;
        }

        #selectableTiles
        {
            list-style-type: none;
            margin: 50 auto;
            padding: 0;
        }

        #selectableTiles li
        {
            margin: 5px;
            padding: 5px;
            float: left;
            width: 150px;
            height: 150px;
            text-align: center;
        }
    </style>
    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
</head>
<body>
    <div id="dialog-confirm" title="">
        <p style="text-align:center; margin-left: 10px; margin-right: 10px">
            You must have scrolled down.
        </p>
    </div>
    <ul id="selectableTiles">
        <li class="ui-state-default">1</li>
        <li class="ui-state-default">2</li>
        <li class="ui-state-default">3</li>
        <li class="ui-state-default">4</li>
        <li class="ui-state-default">5</li>
        <li class="ui-state-default">6</li>
        <li class="ui-state-default">7</li>
        <li class="ui-state-default">8</li>
        <li class="ui-state-default">9</li>
        <li class="ui-state-default">10</li>
    </ul>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#selectableTiles").selectable();
        });
        $("#dialog-confirm").dialog({
            autoOpen: false,
            resizable: false
            modal: true,
            buttons: {
                OK: function () {
                    $(this).dialog("close");
                }
            }
        });
        $(".ui-state-default").dblclick(function (event) {
            $("#dialog-confirm").dialog("option", "title", event.target.textContent);
            $("#dialog-confirm").dialog("open");
        });
    </script>
    <p class="clear">
    </p>
</body>
</html>

http://jsfiddle.net/NbYDH/

The JSFiddle page above recreates the issue in IE. To recreate the issue with Firefox, right-click in the Result panel at the bottom right. Select ‘This Frame’ -> ‘Show Only This Frame’ (you will likely have to shrink the size of the browser window to introduce a scroll bar). I don’t know about other browsers.

You will find that double-clicking on one of the panels only launches a dialog if the scroll bar is a little below the top of the page. This has been a bizarre issue to describe and recreate.

  • 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-13T07:32:15+00:00Added an answer on June 13, 2026 at 7:32 am

    After some more investigation with the selectable() I ran into this SO article
    I combined that with your fiddle and it works. Note that I put everything into one document.ready().

    According to the documentation, the cancel prevents selecting if you start on elements matching the selector. However it requires anohter click event handler to unselect the things again.

    Below the code that works for your situation

    $("#selectableTiles").selectable(
        {cancel: '.ui-selected'}
    );
    $(document).on('click','.ui-selected',function() {
       $(this)
        .removeClass('ui-selected')
        .trigger('selectablestop');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jQuery $('a.popup').click(function(){ window.open( this.href, 'Page title', 'width=600, height=650' ); return false; }); HTML <a
jQuery mobile button renders gibberish for filter button after clicking on pagination. Click event
jQuery mobile 1.0 I change the content of the page, to put it simple:
jquery ui switching from tab view to one view works fine with single tab
jQuery v1.2.6 jQuery.autocompleter plugin v1.1pre (from jQuery's website) I am not able to submit
jQuery Validate, How to give custom error from the custom function based on the
jQuery v 1.7.2, Bootstrap v 2.0.4 (downloaded standard file from homepage this morning) <script
JQuery - prevent form submitting on enter button with out prevent the keystroke $('.filters').keypress(function(event)
jQuery's mouseenter doesn't seem to fire when the mouse entered an element because of
jquery.noConflict doesnt work for some reason when loading from an exernal file using php

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.