jquery-ui-touch-punch icon indicating copy to clipboard operation
jquery-ui-touch-punch copied to clipboard

Can't Edit Forms

Open sandymcfadden opened this issue 13 years ago • 5 comments

If I have a form element inside a draggable area I can't edit it. I'm unable to click inside the form element.

sandymcfadden avatar Jan 13 '12 00:01 sandymcfadden

I can click (touch) into a text area but there's no way of navigating within it. If I click at the end of the text the caret remains at the first position.

ghost avatar Feb 14 '12 14:02 ghost

To fix this I used: $("input, textarea").each(function() { $(this).click(function() { $(this).focus(); }); });

senhor8 avatar May 29 '12 15:05 senhor8

senhor8's solution worked perfectly. Thanks!

uniwiz avatar Sep 13 '12 03:09 uniwiz

Change in _jquery.ui.touch-punch.js_ worked for me. JS: jquery.ui.touch-punch.js Method to modify:

    //line: 31    
    function simulateMouseEvent(event, simulatedType) {
     //...
    }
    //changes to add ++
    if ($(event.target).is("input") || $(event.target).is("textarea")) {
        return;
    } else {
        event.preventDefault();
    }

deepakshrma avatar Dec 04 '15 11:12 deepakshrma

Thank you this fix worked like a charm!

sharrondenice avatar Feb 20 '18 00:02 sharrondenice