fix: Peek overlay position flickering issue (#33499)

## Description

https://theappsmith.slack.com/archives/C0134BAVDB4/p1715768117676669


![image](https://github.com/appsmithorg/appsmith/assets/7846888/a5deedfc-94d8-4904-9045-3122efebb71a)


Fixes #33498 

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9101375888>
> Commit: 001db2594c4b70a19249699b5839a615785ae59c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9101375888&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->






## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
This commit is contained in:
albinAppsmith 2024-05-16 11:33:13 +05:30 committed by GitHub
parent 98dc16d9d0
commit 98b656c04a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -818,7 +818,9 @@ class CodeEditor extends Component<Props, State> {
handleMouseOver = (event: MouseEvent) => {
const tokenElement = event.target;
const rect = (tokenElement as Element).getBoundingClientRect();
if (
!(rect.height === 0 && rect.width === 0) &&
tokenElement instanceof Element &&
this.isPeekableElement(tokenElement)
) {