|
@@ -69,12 +69,16 @@ class OtherHistory extends Component{
|
|
//e.stopPropagation();
|
|
//e.stopPropagation();
|
|
const {fetchPushInfos} = this.props;
|
|
const {fetchPushInfos} = this.props;
|
|
//fetchPushInfos&&fetchPushInfos();
|
|
//fetchPushInfos&&fetchPushInfos();
|
|
- let boxLeft = e.pageX - 102 + 'px';
|
|
|
|
- let boxTop = (+e.target.offsetTop+22)+'px';
|
|
|
|
|
|
+ //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
|
|
|
|
+ const ele = document.activeElement;
|
|
|
|
+ const height = ele.offsetHeight;
|
|
|
|
+ let boxTop = (+(ele.offsetTop)+height)+'px';
|
|
|
|
+ let boxLeft = ele.offsetLeft + 'px';
|
|
this.setState({
|
|
this.setState({
|
|
boxLeft:boxLeft,
|
|
boxLeft:boxLeft,
|
|
boxTop:boxTop
|
|
boxTop:boxTop
|
|
});
|
|
});
|
|
|
|
+
|
|
}
|
|
}
|
|
/*componentWillReceiveProps(next){
|
|
/*componentWillReceiveProps(next){
|
|
const isRead = this.props;
|
|
const isRead = this.props;
|