Web: Files: fixed row mouse click
This commit is contained in:
parent
4d403544f6
commit
3a28b9b1ae
@ -653,7 +653,8 @@ class SectionBodyContent extends React.Component {
|
||||
}
|
||||
|
||||
onMouseDown = e => {
|
||||
if(e.target.tagName !== "DIV") { return; }
|
||||
const mouseButton = e.which ? e.which !== 1 : e.button ? e.button !== 0 : false;
|
||||
if(mouseButton || e.target.tagName !== "DIV") { return; }
|
||||
document.addEventListener("mousemove", this.onMouseMove);
|
||||
this.setTooltipPosition(e);
|
||||
const { selection, setDragging } = this.props;
|
||||
@ -680,7 +681,8 @@ class SectionBodyContent extends React.Component {
|
||||
|
||||
onMouseUp = e => {
|
||||
const { selection, dragging, setDragging } = this.props;
|
||||
if(!this.tooltipRef.current || !dragging) { return; }
|
||||
const mouseButton = e.which ? e.which !== 1 : e.button ? e.button !== 0 : false;
|
||||
if(mouseButton || !this.tooltipRef.current || !dragging) { return; }
|
||||
document.removeEventListener("mousemove", this.onMouseMove);
|
||||
this.tooltipRef.current.style.display = "none";
|
||||
|
||||
|
@ -37,8 +37,9 @@ class SelectedFrame extends React.Component {
|
||||
};
|
||||
|
||||
onMouseDown = e => {
|
||||
const mouseButton = e.which ? e.which !== 1 : e.button ? e.button !== 0 : false;
|
||||
this.container = document.getElementById("rowContainer");
|
||||
if(!this.container || e.target.tagName !== "DIV") {
|
||||
if(mouseButton || !this.container || e.target.tagName !== "DIV") {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -136,7 +137,9 @@ class SelectedFrame extends React.Component {
|
||||
}
|
||||
};
|
||||
|
||||
onMouseUp = () => {
|
||||
onMouseUp = e => {
|
||||
const mouseButton = e.which ? e.which !== 1 : e.button ? e.button !== 0 : false;
|
||||
if(mouseButton) { return; }
|
||||
const frame = this.refFrame.current;
|
||||
frame.style.visibility = "hidden";
|
||||
document.removeEventListener("mousemove", this.onMouseMove);
|
||||
|
Loading…
Reference in New Issue
Block a user