Front-end - WeChat public account developed with ionic. When long-pressing the QR code picture, the "Identify QR code in the picture" menu cannot pop up.
我想大声告诉你
我想大声告诉你 2017-05-15 16:55:07
0
3
791

There is a QR code page in the official account that is shared with others. When long-pressed, the WeChat menu does not pop up like QR codes in other places. I would like to ask those who have relevant experience, what is the reason?

Is it that ionic itself prohibits long pressing on the page to perform operations such as selection and copying, so long pressing on the picture cannot trigger the corresponding behavior of WeChat?

There is a similar question on Zhihu: http://www.zhihu.com/question/28150871

But no one answered T-T

我想大声告诉你
我想大声告诉你

reply all(3)
曾经蜡笔没有小新

The master in the team solved it:
Add an attribute to the img element of the QR code: data-tap-disabled: true
Ionic official document explains this attribute: http://ionicframework.com/docs/api/page/tap/

曾经蜡笔没有小新

This is called tap hold event in jquery mobile. After searching, it seems to be called on-hold event in ionic. Try it and see if it’s right.

伊谢尔伦

How do you use ionic to generate QR codes? I am encountering such a problem now!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template