diff --git a/CHANGELOG.md b/CHANGELOG.md index b514f5104134..3dcbd4213792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated the path to python for DL models inside automatic annotation documentation () - Fixed of receiving function variable () - Shortcuts with CAPSLOCK enabled and with non-US languages activated () +- Prevented creating several issues for the same object () - Fixed label editor name field validator () ### Security diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 0cd1ddc4cb36..a51ba06021b3 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.15.1", + "version": "1.15.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 5d8bf3b4b3ee..027fffe58974 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.15.1", + "version": "1.15.2", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx index 579bec3129f0..1be37564d951 100644 --- a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx +++ b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -import React, { ReactPortal, useEffect } from 'react'; +import React, { ReactPortal, useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; import Tag from 'antd/lib/tag'; import { CheckOutlined, CloseCircleOutlined } from '@ant-design/icons'; @@ -25,6 +25,8 @@ export default function HiddenIssueLabel(props: Props): ReactPortal { id, message, top, left, resolved, onClick, highlight, blur, } = props; + const ref = useRef(null); + useEffect(() => { if (!resolved) { setTimeout(highlight); @@ -37,10 +39,21 @@ export default function HiddenIssueLabel(props: Props): ReactPortal { return ReactDOM.createPortal( { + if (ref.current !== null) { + const selfElement = ref.current; + if (event.deltaX > 0) { + selfElement.parentElement?.appendChild(selfElement); + } else { + selfElement.parentElement?.prepend(selfElement); + } + } + }} style={{ top, left }} className='cvat-hidden-issue-label' >