search

Home  >  Q&A  >  body text

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.

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

我想大声告诉你我想大声告诉你2795 days ago793

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-15 16:57:07

    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/

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-15 16:57:07

    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.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-15 16:57:07

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

    reply
    0
  • Cancelreply