It took me a little bit, but I figured out that I can't click on my inputs because of the touch.punch script I'm using to enable jquery UI drag functionality on touch devices. Anyone familiar with this script know why that might be? The form actually resides down the tree of the parent object. Does anyone know a way I can override or force through the selection? I'm going to try binding events that force focus to the input right now but maybe someone here has some insight?
相关问题
- Setting 'option' on jqueryui DatePicker cl
- Jasper: error opening input stream from url
- is it normal for image inputs to be omitted from t
- How do I discard user input delivered during sleep
- How to make CSS input range thumb not appear at fi
相关文章
- 放在input的text下文本一直出现一个/(即使还没输入任何值)是什么情况
- jQuery UI Sortable: Scroll entire page as well as
- Set the z-index value of a jQuery autocomplete inp
- jQuery UI Sortable animations
- Show a different value from an input that what wil
- Is there a way to hide the new HTML5 spinbox contr
- jQuery accordion: prevent pane from opening/cancel
- jQuery UI datepicker - Trying to capture click eve
To anyone who might wind up here with a similar situation using the very handy touch.punch hack, simply forcing the focus through on a click event will work just fine!
Folks, the other two answers here did NOT work for me, but Danwilliger's solution works; however, it's not clear from his answer how exactly to set it up in the Touch Punch JS file. For future answer-seekers, here's what to do. Again, this is Danwilliger's solution -- I'm just clarifying.
Change this section in jquery.ui.touch-punch.js (on approximately line 30):
To this:
Best of luck!
OK here's another solution if your
textfield
whatever HTML element is ain't focusing,scrolling, selecting words, moving text cursor around the text and whatever different scenarios might come then you may override the jquery.ui.touch.punch.js script. I assume that your element isn't the draggable one but probably a child of it as my case was.Put a class on your html element, for example
class="useDefault"
. Then go to the script file and find that part:As you can probably see
event.preventDefault();
assures that jquery.ui.touch.punch.js overrides the default behaviors of the browser. To prevent that for our particular class node, make the following modifications:This solution is tested with webkit browsers only and jQuery UI Touch Punch 0.2.2 release.
Hope that quick solution helps, BR
Throttlehead's solution worked for me. Simpler perhaps to just use the JQuery selectors to cover all inputs and textareas:
I actually tried adding the lines which Danwilliger mentioned, it did not do the trick for me.
What worked for me was
I am not really sure why the other answers posted did not work, but for anyone else out there if they have the same issue try my solution out :).
One solution is to use a handle. Add an icon inside and use this to drag. Then the inputs work fine.