Thumb control bug

Jul 21, 2010 at 11:55 AM
Edited Jul 21, 2010 at 11:57 AM

Just stumpled across a little bug with the thumb control. White grabs the item at the upper left corner. that works if you try to grab a rectangle. I tried it with an ellipse and it didn't work because White did try to grab the ellipse outside of its shape. Ideally the control should check if the point where it tries to grab the item actually is part of the shape.

The critical part in the code is:

public virtual Point Location
get { return automationElement.Current.BoundingRectangle.TopLeft; }

I doubt that the majority of draggable items really fill the upper left corner of their bounding rectangle (just think of the popular rounded corners). Maybe this should be changed to the center of the bounding rectangle in a first step. In later step, White could check if the grab at this location is really successful.

Jul 25, 2010 at 3:23 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.