首先,请原谅我做一次标题党: 但我觉得从发现问题到最后解决问题的过程还是蛮有意思的,特此记录一下: 背景 近两天开发的航班延误宝是内嵌在客户端(android.ios)webview 中的 H5 页面.其中有部分内容需要前端排序后再显示.代码很简单: let m = [6,4,8,10,3,5] console.log('排序前:', [6,4,8,10,3,5]) m.sort((a, b) => a < b) console.log('排序后:', m) ps:发现这段代码的问题了么?如果
原因: By default, Safari Mobile does not use the :active state unless there is a touchstart event handler on the relevant element or on the <body>. 解决方法: 1.body标签上添加ontouchstart空方法(页面首个元素起作用) <body ontouchstart=""> </body> 2.docu