mirror of
https://github.com/wassname/slider.git
synced 2026-10-28 13:30:39 +08:00
fix: fix ie8 can not support e.pageX bug.
This commit is contained in:
1 parent
41f5ddb9bd
commit
b70a4e8c94
1 file changed
+2
-2
+2
-2
@@ -112,7 +112,7 @@ const Slider = React.createClass({
|
||||
},
|
||||
|
||||
onMouseMove(e) {
|
||||
const position = e.pageX;
|
||||
const position = e.pageX || (e.clientX + document.documentElement.scrollLeft); // to compat ie8
|
||||
this.onMove(e, position);
|
||||
},
|
||||
|
||||
@@ -162,7 +162,7 @@ const Slider = React.createClass({
|
||||
},
|
||||
|
||||
onSliderMouseDown(e) {
|
||||
const position = e.pageX;
|
||||
const position = e.pageX || (e.clientX + document.documentElement.scrollLeft); // to compat ie8
|
||||
const value = this._calValueByPos(position);
|
||||
this._triggerEvents('onChange', value);
|
||||
this._start(position);
|
||||
|
||||
Reference in new issue
Block a user