chimee icon indicating copy to clipboard operation
chimee copied to clipboard

pointer-event 兼容性 bug

Open yandeqiang opened this issue 7 years ago • 8 comments

chimee 的兼容性支持到 ie 多少? 透明插件使用的 pointer-events 兼容性到 ie 11。

yandeqiang avatar Nov 29 '17 09:11 yandeqiang

video播放器IE9开始支持

songguangyu avatar Nov 29 '17 11:11 songguangyu

chimee 到 ie9,但是需要 babel-polyfill.

pointer-events 这个现在真没兼容。。。周末弄一下

https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#pointer-events-api

toxic-johann avatar Nov 29 '17 11:11 toxic-johann

上面那个包好像自定义元素的事件,好像不可以 polyfill 得重新看下

yandeqiang avatar Dec 01 '17 10:12 yandeqiang

如果确实不可以的话,就得等了。

toxic-johann avatar Dec 01 '17 14:12 toxic-johann

https://github.com/screeny05/jquery.pointer-events-polyfill https://github.com/Rich-Harris/Points https://github.com/kmewhort/pointer_events_polyfill https://github.com/jquery/PEP

toxic-johann avatar Jun 21 '18 02:06 toxic-johann

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <!--[if IE 9 ]>
  <script src="http://lib.baomitu.com/jquery/1.9.0/jquery.min.js"></script>
  <script src="./demo03.js">
    
  </script>
  <script>
    $(document).ready(function(){
      PointerEventsPolyfill.initialize();
    });
  </script>
  <![endif]-->
  <title>Document</title>
  <style>
    #ap {
      pointer-events: none;
      height: 100px;
      width: 100%;
    }
  </style>
</head>
<body>
  <div id="ap">

  </div>

  <script>
    // 不可以阻止
    document.getElementById('ap').onclick = function (e) {
      console.log(111)
    }
    // 可以阻止
    $('#ap').onclick = function () {
      console.log(222)
    }
  </script>
</body>
</html>

试了下。 核心是使用 jquery 事件 的return false 这个。这个在 jquery 环境下,是可以做到的。这个用 jquery 注册的事件的话,是可以阻止后面的事件执行。 单用 js 写的话, 不行。

不过按照现有的方式,给 chimee-helper-events 也加一个 return false 的判断逻辑。 也可以实现。

yandeqiang avatar Jun 25 '18 06:06 yandeqiang

如果改造成本不大的话,那就实现下吧~

toxic-johann avatar Jun 25 '18 06:06 toxic-johann

hls直播 IE支持吗?

shen-lan avatar Nov 23 '18 02:11 shen-lan