调度事件,ie9,svg和css指针事件

时间:2013-11-01 01:14:21

标签: javascript css javascript-events svg dom-events

我在div上面有svg层,我想将事件从svg调度到div层,其中contenteditable设置为true,因此div具有焦点。 这是html:

<!DOCTYPE html>
<html>
<head>  
</head>
  <body>
    <div class="div1" contenteditable="true" style="width:100px; height:100px; border:solid 1px red; position:absolute; left:0; top:0;">
    </div>
    <svg height="100" version="1.1" width="100" xmlns="http://www.w3.org/2000/svg" style="position: absolute;left:50px; top:0; border:2px solid blue;pointer-events:none;" id="raphaelCanvasSvg"><desc></desc><defs/></svg>
</body>
</html>

我注意到如果底层div包含文本我不需要发送事件,否则我会这样做。

这是图形表示:

enter image description here

否则:

enter image description here

即使用户点击下面没有文字的部分,是否可以发送活动?

编辑: 为了进一步澄清我的问题,是否有可能在ie9中获得与ff或Chrome相同的行为: js fiddle

0 个答案:

没有答案