pointer-events

SVG still receives clicks, even if pointer-events: visible/painted

本小妞迷上赌 提交于 2019-12-10 16:26:32
问题 Basically, I have a couple .svg images put into an <img> tag on my HTML page like that: <img src="images/corner.svg" alt="menu" class="menu" onClick="Fade();"/> All of those images are overlapping with each other. They have the same size but different content. I'm now trying to make only the content of those images clickable. With pointer-events: visible; or pointer-events: painted; in CSS that seemed to be possible, but i can't get it work like that. The image still receives clicks at every

What is -ms-touch-action called in other browsers?

混江龙づ霸主 提交于 2019-12-10 02:19:10
问题 What is the equivalent to -ms-touch-action for other browsers? 回答1: There is now a non-prefixed touch-action property, proposed in the W3C Pointer Events Candidate recomendation. From the MSDN documentation linked to in the OP: As of Internet Explorer 11, the Microsoft vendor prefixed version of this event ( -ms-touch-action ) is no longer supported and may be removed in a future release. Instead, use the non-prefixed name touch-action , which is better for standards compliance and future

RTSP转RTSP、RTMP、HLS、FLV安防摄像头网页无插件直播流媒体服务器EasyNVR在IE浏览器下的 pointer-events- none前端兼容性调试

青春壹個敷衍的年華 提交于 2019-12-09 15:16:39
背景说明 由于互联网的飞速发展,传统安防摄像头的视频监控直播与互联网直播相结合是大势所趋。传统安防的直播大多在一个局域网内,在播放的客户端上也是有所限制,一般都需要OCX Web插件进行直播。对于安防监控的视频直播需求,根据不同的业务需求,对视频直播需求也不尽相同。针对这样的行业大环境背景,立足于开源社区的EasyDarwin团队推出了EasyNVR、EasyDSS等系列产品。而对于安防监控的视频直播需求,对延时要求都比较高。 IE浏览器下的pointer-events- none问题 在我们调试EasyNVR的web页面过程中,力求的都是一个播放效果的、功能的展示。对于兼容性也有注意,但有些细小的部分还是难免有所疏忽。内部测试发现:由于我们是流媒体的实时视频直播,在web的直播页面中,我们都是屏蔽、删除播放器的暂停按钮、功能的。我们的web页面播放rtmp、hls使用的是videojs,因此,我们需要通过设置css属性来完成这个需求。 发现问题 屏蔽单机页面暂停 .video-js .vjs-tech { pointer-events: none; } 这个属性设置 很好的在chrome中完成了需求。但是在IE中似乎就没有能够完成自己应有的任务了。 隐藏暂停、开始按钮 .vjs-progress-control,.vjs-remaining-time-display{

pointer events on click but not on scroll

喜你入骨 提交于 2019-12-07 02:44:36
问题 Is it possible to allow click but not scroll events? pointer-events: none; Will disable both types of inputs, I would like to disable only scroll. Any other ideas for workarounds? 回答1: Do it with javascript: function noScroll(event) { event = event || window.event; if (event.preventDefault) { event.preventDefault(); } event.returnValue = false; return false; } // disable scolling on the whole window: if (!window.addEventListener) { // old IE only window.attachEvent("onscroll", noScroll); }

How can I pass ONLY clicks through a SVG with pointer-events?

有些话、适合烂在心里 提交于 2019-12-05 02:39:38
问题 I have a SVG overlaying a div with a button. I know that i can pass mouse-events through the SVG by setting "pointer-events: none;" for my SVG. However when I do this the SVG wont recognize mouse-events anymore. <body> <div id="website"> <form action="input_button.htm"> <p> <textarea cols="20" rows="4" name="text"></textarea> <input type="button" name="Text 1" value="show text" onclick="this.form.text.value='Test'"> </p> </form> </div> <div id="svgRect"> <svg width="1845" height="140"> <rect

实现多层DIV叠加的js事件穿透

岁酱吖の 提交于 2019-12-05 02:36:28
Flash里面有个很好的特性是,一个容器里,不存在实际对象的部分,不会阻拦鼠标事件穿透到下一层。 前端就不一样了,两个div层叠以后,上层div会接收到所有事件(即使这个div里面内容是空的,没有任何实际对象),下层div什么事件都接不到。 举个例子: 这个示意图中 C方块在A容器中(A容器边框为红色) D方块在B容器中(B容器边框为绿色) A B部分重叠,B在上层。 不做任何处理的话,C方块永远无法被点到,因为B把它盖住了。 下面,我将给出一种方案,在不改变页面结构的情况下,让CD都能得到正常相应。 主要利用的是css中的 pointer-events 属性 语法: pointer-events :auto | none | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all 默认值 :auto 适用于 :所有元素 继承性 :有 动画性 :否 计算值 :指定值 取值: auto: 与pointer-events属性未指定时的表现效果相同。在svg内容上与 visiblepainted 值相同 none: 元素永远不会成为鼠标事件的target。但是,当其后代元素的pointer-events属性指定其他值时,鼠标事件可以指向后代元素,在这种情况下

What is -ms-touch-action called in other browsers?

丶灬走出姿态 提交于 2019-12-05 01:31:37
What is the equivalent to -ms-touch-action for other browsers? There is now a non-prefixed touch-action property, proposed in the W3C Pointer Events Candidate recomendation . From the MSDN documentation linked to in the OP : As of Internet Explorer 11, the Microsoft vendor prefixed version of this event ( -ms-touch-action ) is no longer supported and may be removed in a future release. Instead, use the non-prefixed name touch-action , which is better for standards compliance and future compatibility. There isn't one. It's part of IE10's features for supporting custom multi-touch interactions

css不常见属性之pointer-events

孤者浪人 提交于 2019-12-04 06:01:14
MDN 上介绍为 CSS 属性指定在什么情况下 (如果有) 某个特定的图形元素可以成为鼠标事件的 target。 pointer-events 属性值有: /* Keyword values */ pointer-events: auto; pointer-events: none; pointer-events: visiblePainted; /* SVG only */ pointer-events: visibleFill; /* SVG only */ pointer-events: visibleStroke; /* SVG only */ pointer-events: visible; /* SVG only */ pointer-events: painted; /* SVG only */ pointer-events: fill; /* SVG only */ pointer-events: stroke; /* SVG only */ pointer-events: all; /* SVG only */ /* Global values */ pointer-events: inherit; pointer-events: initial; pointer-events: unset; 其中默认属性为 auto。 当值为none表示鼠标事件“穿透

How can I pass ONLY clicks through a SVG with pointer-events?

这一生的挚爱 提交于 2019-12-03 17:21:56
I have a SVG overlaying a div with a button. I know that i can pass mouse-events through the SVG by setting "pointer-events: none;" for my SVG. However when I do this the SVG wont recognize mouse-events anymore. <body> <div id="website"> <form action="input_button.htm"> <p> <textarea cols="20" rows="4" name="text"></textarea> <input type="button" name="Text 1" value="show text" onclick="this.form.text.value='Test'"> </p> </form> </div> <div id="svgRect"> <svg width="1845" height="140"> <rect id="r0"></rect> </svg> </div> </body> I want my SVG to be able to recognize when the mouse is over it

`pointermove` event not working with touch. Why not?

久未见 提交于 2019-12-03 07:01:26
I have this pen: https://codepen.io/anon/pen/eyKeqK If you try it on a touch-screen device (f.e. visit the pen on your phone) you'll notice that when you drag, the white light (the little sphere) only moves for a tiny bit then it stops working. The logic for the movement is in the pointermove event handler. It works fine on Desktop using a mouse, just not with touch. How do we fix this so the light keeps moving while touch dragging (not just for a moment), and as bonus how do we prevent it from refreshing the page when we pull down? Here's the code for the pen: HTML (Slim): /! Made with http:/