언어 설정

Menu
Sites
Language
How to mask long press event

I have a html UI,when long press some text or image ,it

would popup "copy" or "save image as ..." strings and so on

so how can I mask that function

 

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

15 댓글
Lakshmi Grandhi
Hi , Use taphold event for long press, and context popup to show menu. For more information go through the document http://api.jquerymobile.com/taphold/
tattoo wu
I don't use any long press events in my code, but long press event works,it auto popups some menu and my purpose is that I don't want html to receive the event it meams I don't want to html popup menu . but how?
tattoo wu
You can new a muti-web-page sample in tizen ide, and debug it on your simulator or device. Then you can long press any string on the page, and it will popup up "copy" menu and focus the string what you are pressing. By the way:how can I upload images or attachments?I can show you what happend.
Lakshmi Grandhi
Hi , can you share your code to check.
tattoo wu
You can new a muti-web-page sample in tizen ide, and debug it on your simulator or device. Then you can long press any string on the page, and it will popup up "copy" menu and focus the string what you are pressing. By the way:how can I upload images or attachments?I can show you what happend.
Lakshmi Grandhi
Hi , I tried the above steps mentioned, but not able to reproduce, kindly upload your screenshot to http://tinypic.com/ and share the url
tattoo wu
I run muti-web-pages sample on simulator, I long press "referring" string and get a photo http://i1344.photobucket.com/albums/p654/tattoowu/pressed-1_zps7ceb8f0a.png then when I release,I get another photo http://i1344.photobucket.com/albums/p654/tattoowu/pressed-2_zpsbcbb8f06.png
Vineet Tiwari
Hi tattoo wu, Which version of SDK are u using currently? Regards, Vineet Tiwari
tattoo wu
My sdk version is 2.0.0a http://i1344.photobucket.com/albums/p654/tattoowu/tizen-sdk-version_zps7d754616.png but my simulator version is 2.0.0 http://i1344.photobucket.com/albums/p654/tattoowu/tizen-sdk-simulator-version_zpse1f4b6e1.png I have 201209(2.0.0a) and 201302(2.0.0) sdk at the same time and I use jquery docs as follow:
tattoo wu
jquery-1.9.1.min.js jquery.mobile.min.js jquery.mobile.min.css
Lakshmi Grandhi
Hi tattoo, Tizen 2.0.0.a sdk creates page with below mentioned files, are you additionally adding the jquery-1.9.1.min.js javascript file ??
 <link rel="stylesheet" href="./css/jquery.mobile-1.1.0.css"/>
 <script type="text/javascript" src="./js/jquery-1.7.1.js"></script>
 <script type="text/javascript" src="./js/jquery.mobile-1.1.0.js"></script>
tattoo wu
When I new muti-web-page sample ,I get the same files as you said. And in myself code ,I use 1.9 jquery,but both have the issue!
Lakshmi Grandhi
Hi tattoo, Can you please try below code In css file add this body { -webkit-touch-callout: none !important; } a { -webkit-user-select: none !important; } and in javascipt function onBodyLoad() { $("a").bind('taphold', function(event) { event.preventDefault(); }); } add this script
tattoo wu
as the code if I set body { -webkit-user-select: none; } it works. but only string,not img. long press string , not popup menu,but long press img ,popup menu like this: http://i1344.photobucket.com/albums/p654/tattoowu/long-press-img_zps184bfbf9.png I have tried $("a").bind('taphold', function(event) { event.preventDefault(); }); and $("img") and $("body") also.
Uday Bhaskar D
try this link https://developer.tizen.org/help/topic/org.tizen.web.appprogramming/html/guide/ui_guide/ui_framework_utilities.htm?resultof=%22%63%6f%6e%74%65%78%74%22%20%22%6d%65%6e%75%22%20