Fix Bug 69323
When opening file from Upload panel in the same tab no Close button in Editor
This commit is contained in:
parent
d300a0fec3
commit
912e16c3f4
@ -323,6 +323,11 @@ class FileRow extends Component {
|
||||
|
||||
const onMediaClick = () => this.onMediaClick(item.fileId);
|
||||
|
||||
const onFileClick = (url) => {
|
||||
if (!url) return;
|
||||
window.open(url, downloadInCurrentTab ? "_self" : "_blank");
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledFileRow
|
||||
@ -352,11 +357,14 @@ class FileRow extends Component {
|
||||
) : (
|
||||
<div className="upload-panel_file-name">
|
||||
<Link
|
||||
onClick={() =>
|
||||
onFileClick(item.fileInfo ? item.fileInfo.webUrl : "")
|
||||
}
|
||||
fontWeight="600"
|
||||
color={item.error && "#A3A9AE"}
|
||||
truncate
|
||||
href={item.fileInfo ? item.fileInfo.webUrl : ""}
|
||||
target={downloadInCurrentTab ? "_self" : "_blank"}
|
||||
// href={item.fileInfo ? item.fileInfo.webUrl : ""}
|
||||
// target={downloadInCurrentTab ? "_self" : "_blank"}
|
||||
>
|
||||
{name}
|
||||
{fileExtension}
|
||||
|
Loading…
Reference in New Issue
Block a user