Skip to content

Improve error message when trying to interact with element that is hidden because of low opacity #398

Description

@calebeby

Currently if you try to click/type an element that has low opacity to the point of not being visible, here is the error message:

Cannot perform action on element that is not visible (it is near zero opacity):
<...element ...>

It would be easier to debug if it cascaded up the DOM tree and printed out any non-opaque element:

Cannot perform action on element that is not visible (it is near zero opacity):
<input ...>

Its ancestor, this <div>, has an opacity of 0.02:
<div ...>

Or if there are multiple:

Cannot perform action on element that is not visible (it is near zero opacity):
<input ...>

Its ancestor, this <div>, has an opacity of 0.25:
<div ...>

Another ancestor, this <div>, has an opacity of 0.25:
<div ...>

Another ancestor, this <div>, has an opacity of 0.25:
<div ...>

This results in the <input> having a net opacity of 0.016, which is not visible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions