|
@@ -137,14 +137,13 @@ class MainSuit extends Component{
|
|
|
// e.stopPropagation(); //冒泡到最顶层关闭其他下拉
|
|
|
//若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
|
|
|
const ele = document.activeElement;
|
|
|
- console.log(ele.toString())
|
|
|
if(ele.toString().indexOf('HTMLSpanElement') == -1){ //点击的不是span无法聚焦就不再设置位置
|
|
|
- return;
|
|
|
+ // return; //主诉清空焦点在div内
|
|
|
}
|
|
|
const leftL = ele.offsetLeft; //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
|
|
|
this.setState({
|
|
|
// boxLeft:getPageCoordinate(e).boxLeft,
|
|
|
- boxLeft:leftL+90,
|
|
|
+ boxLeft:leftL+60,
|
|
|
boxTop:getPageCoordinate(e).boxTop,
|
|
|
tmpScroll: $("#addScrollEvent")[0].scrollTop,
|
|
|
tmpTop:getPageCoordinate(e).boxTop
|