Skip to content

Commit c7c4c0e

Browse files
authored
fix: selecting components highlighting bounds incorrectly (#129)
1 parent 35855ba commit c7c4c0e

File tree

1 file changed

+2
-2
lines changed
  • packages/devtools-kit/src/core/component-inspector

1 file changed

+2
-2
lines changed

packages/devtools-kit/src/core/component-inspector/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ function inspectFn(e: MouseEvent) {
150150
if (instance) {
151151
inspectInstance = instance
152152
const el = instance.vnode.el as HTMLElement | undefined
153-
if (el && el.nodeType === Node.ELEMENT_NODE) {
154-
const bounds = el.getBoundingClientRect()
153+
if (el) {
154+
const bounds = getComponentBoundingRect(instance)
155155
const name = getInstanceName(instance)
156156
const container = getCotainerElement()
157157
container ? update({ bounds, name }) : create({ bounds, name })

0 commit comments

Comments
 (0)