From cfc141b1c746ad846d7cd52ebf988672b3740fd8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 22 Jan 2016 13:54:16 +0800 Subject: [PATCH] capture mousePosition event register in document --- components/modal/Modal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/Modal.jsx b/components/modal/Modal.jsx index 5726b96328..066b9e0cfc 100644 --- a/components/modal/Modal.jsx +++ b/components/modal/Modal.jsx @@ -37,7 +37,7 @@ let AntModal = React.createClass({ return; } // 只有点击事件支持从鼠标位置动画展开 - Dom.addEventListener(document.body, 'click', function onDocumentMousemove(e) { + Dom.addEventListener(document.documentElement, 'click', function onDocumentMousemove(e) { mousePosition = { x: e.pageX, y: e.pageY