Results 1 to 5 of 5

Thread: Grid cellclick celldblclick conflict

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    6

    Default Grid cellclick celldblclick conflict

    I would like to have both a cellclick listener and a celldblclick listener on a grid. With a cellclick listener, though, the celldblclick is never fired. I don't know if this is a bug or if the two are not compatible. I've included a fiddle that demonstrates.

    https://fiddle.sencha.com/#fiddle/13ja

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I would say they aren't compatible, or at least that I personally don't recommend using click and dblclick on the same component.

  3. #3
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    Change the alert() to console.log() and you'll see them both. By showing the alert you're masking the page and preventing the dblclick from being processed correctly.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2015
    Posts
    6

    Default

    So, if the desired behavior is to have a window of some description open on the click then to use both clicks a timer would need to be added? What I'm saying is to effectively use them as separate events a timer is required.

  5. #5
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    Yeah, something along the lines of:

    Code:
    var task = new Ext.util.DelayedTask(function() {
        doClick();
    });
    
    listeners: {
        click: function() {
            task.delay(300);
        },
        dblclick: function() {
            task.cancel();
            doDblClick();
        }
    }

Similar Threads

  1. Replies: 2
    Last Post: 17 Sep 2012, 2:56 AM
  2. Replies: 1
    Last Post: 21 Jun 2011, 11:45 AM
  3. Smarter cellclick/celldblclick?
    By jarlau in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 27 Aug 2009, 1:48 AM
  4. Getting value while celldblclick in grid
    By frank_ash in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 1 Apr 2009, 2:21 AM
  5. how to distinct editorGrid's cellclick from celldblclick
    By lixiaoxu85 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 28 Apr 2008, 7:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •