Skip to content

🎯 Element picker stops at fixed size instead of narrowing to smallest element #72

@ahelme

Description

@ahelme

Issue Description

The element picker overlay doesn't narrow down to the smallest clickable element - it stops at a certain size regardless of the actual target element.

Expected Behavior

When hovering over nested elements (e.g., a link inside a button inside a div), the picker should highlight progressively smaller elements as you move the mouse, ultimately selecting the most specific element under the cursor (e.g., a.MV3Tnb).

Actual Behavior

The picker stops at a certain element size and won't narrow down further, even when there are smaller child elements available. It appears to be selecting a parent container instead of the specific target element.

Examples from Testing

  • Expected: Select just "I'm Feeling Lucky" div
  • Actual: Selected larger parent container
  • Expected: Select a.MV3Tnb link element
  • Actual: Selected same-sized parent element

Technical Context

This appears to be in the element picker implementation in content-element-picker.js. Possible causes:

  • Element size threshold preventing selection of smaller elements
  • Z-index or layering issues
  • Element detection logic stopping too early in the DOM tree

Impact

  • Reduces precision of element selection
  • Users cannot target specific small elements
  • Screenshots may include more context than intended

Related Code

  • chrome-extension/content-element-picker.js - Element picker implementation
  • Element highlighting and selection logic

Discovered During

Visual Messaging MVP testing - Iterations 1-17 autonomous sprint
Real-time testing with user feedback via visual messaging system

Priority

Medium - Feature works but lacks precision for small elements

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions