Holding down on text in iOS does not bring up the 'copy' button on jQueryMobile Dialog when using ajax

本秂侑毒 提交于 2019-12-04 10:41:30

I'm afraid i can't provide simple answer to your question (like adding something in config or init), but i hope current solution will be sufficient.


Problem

Problem lies quite deep in the code of this framework. First of all we have a jquery.mobile.dialog.js file in which we have a line:

    $el.bind( "vclick submit", function( event ) {
               // code
            })

As you can see here we are adding a binding vclick to the $el - whole dialog box container.

Event vclick on it's own is generated by jQuery Mobile in vmouse.js and after digging there i managed to detect where actual problem arises:

    $( this ).bind( realType, dummyMouseHandler );

This line is required to make event work in some browsers, namely Opera Mini (as described in commented text above this line).


Solution

So, here is one of the solutions, open file jquery.mobile.vmouse.js and comment out line

    $( this ).bind( realType, dummyMouseHandler );

I've tested it on an iPad and copy functionality is available after that tiny patch.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!