jQuery UI Widgets Forums Grid Drag Event is still true when grid looses focus

This topic contains 6 replies, has 2 voices, and was last updated by  realtek 5 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author

  • realtek
    Participant

    Hi,

    I’m not sure if this is a bug or not but I have the following:

    1. A jqxTab widget
    2. A jqxGrid is loaded inside a jqxTab
    3. The jqxGrid has Drag and Drop enabled
    4. When a row is double clicked in the jqxGrid, A new tab is created which has an Iframe inside it

    What happens is once you have double clicked a row and the new tab is opened, if you then move the cursor up to one of the tabs at the top, the row drag content appears at 0, 0 position of the browser.

    I think that because the tab with the Grid in it looses focus, it does not register the mouse click has finished and assumes it is still held down.

    Is this an issue or something wrong with my code?

    I am using this to open a new tab:

    $('#jqxgrid').on('rowdoubleclick', function (event) {
        var args = event.args;
        // row's bound index.
        var boundIndex = args.rowindex;
        // row's visible index.
        var visibleIndex = args.visibleindex;
        // right click.
        var rightclick = args.rightclick;
        // original event.
        var ev = args.originalEvent;
    
        var data = $("#jqxgrid").jqxGrid('getrowdata', boundIndex);
        openForm(Form, data["Ref #"], view);
    });
    • This topic was modified 5 years, 6 months ago by  realtek.

    realtek
    Participant

    This actually happens when you move the cursor out of the iframe, not just going up to the tabs.


    Hristo
    Participant

    Hello realtek,

    We try to simulate that issue and looks work correct.
    Could you share more code or provide us example for better analyze (https://www.jseditor.io/ or http://fiddle.jshell.net/).

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    realtek
    Participant

    Hi Hristo,

    Thanks for your reply. Here is an example of the issue I just knocked up, it shows the basic issue but code is a but messy:

    http://jsfiddle.net/realtek/7pdyg/373/

    Just double click a cell, and then when the second tab gets selected move your cursor outside of the tabs widget and you will see the row drag image appear!

    Thanks

    • This reply was modified 5 years, 6 months ago by  realtek.

    realtek
    Participant

    Hi,

    I just wondered if someone had managed to look at the example I posted?

    The issues seems to be related to the fact there is an iframe inside the tabs.

    Thanks


    Hristo
    Participant

    Hello realtek,

    This is specific case.
    We provide one workaround, please take a look this example: http://jsfiddle.net/hristoxux/a0h1nuzw/
    You could focus on function openForm() $(document).trigger('mouseup');.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    realtek
    Participant

    Thank you Hristo this resolves the issue!

    I had already tried a trigger(‘click’) on the body or various other elements but did not think of ‘mouseup’

    Thank you for this.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.