Problem Description:

H5 home page banner picture, long press in android wechat can recognize the TWO-DIMENSIONAL code, but on some ios models, long press the picture can not recognize the two-dimensional code.

Test model:

  • Iphone6s Plus operating system 12.1 wechat version 6.7.4

  • Iphone7 system 12.0.1 wechat version 6.7.4

Troubleshooting:

  • (1) Open the picture alone in wechat, and long press to recognize the TWO-DIMENSIONAL code, excluding the picture blur problem;
  • (2) Internet search, the following solutions are invalid
    • 1. Change the positioning mode from absolute to traditional margin (it is said that absolute positioning causes this problem);
    • 2, change the maximum-scale on viewport to be greater than 1 (see solution on network);
    • 3, the network has said that position: fixed; Positioning can cause this problem;
  • (3) this problem little information on the net, we find the problem in the code, after repeated experiments, and found that the code used in the window. The history, replaceState (null, null, newUrl); Window.location. href=newUrl, comment out this code, find the QR code is recognized.

Problem solving:

ReplaceState and window.location.href cannot be deleted due to business needs. Look forward to the majority of netizens to give a way.