jQWidgets Forums

jQuery UI Widgets Forums Grid Copy / Paste issue

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 4 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Copy / Paste issue #114220

    flaviolenz
    Participant

    Just a usefull info: (maybe jqwidgets would like to fix that)

    I’ve set a ‘paste’ eventListener to a Textarea element (nothing related to the Grid)
    document.getElementById(‘txt’).addEventListener(‘paste’, f);
    Strangelly, when I was trying the Ctrl-C, element ‘txt’ was already gone (itsParent.innerHTML = ”) which was supposed to remove all Listeners of the element.

    After this, Ctrl-C stopped working if I was not editing the cell.
    Ctrl-V was OK.

    After a lot of struggle, I discovered an workaround that if I explicitly remove the event to that same element, Ctrl-C was OK.
    document.getElementById(‘txt’).removeEventListener(‘paste’, f);

    Copy / Paste issue #114229

    Hristo
    Participant

    Hello flaviolenz,

    Please, provide us with more details.
    What is your case and what do you want to achieve?
    I tested this demo and it seems to work fine:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtextarea/defaultfunctionality.htm?light-ie
    You could try to bind to the paste event on that way too:
    $("#jqxTextArea").find("textarea").on("paste", event => console.log("paste", event));
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.