Skip to content

Commit

Permalink
Merge pull request #396 from Ratipoka/main
Browse files Browse the repository at this point in the history
better error for click on element which is not visible
  • Loading branch information
mdrokz committed Aug 9, 2023
2 parents e99b591 + 0bf1f9e commit 4f5f827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/tab/element/mod.rs
Expand Up @@ -515,7 +515,7 @@ impl<'a> Element<'a> {
object_id: None,
})
.map(|quad| {
let raw_quad = quad.quads.first().unwrap();
let raw_quad = quad.quads.first().expect("tried to get the midpoint of an element which is not visible");
let input_quad = ElementQuad::from_raw_points(raw_quad);

(input_quad.bottom_right + input_quad.top_left) / 2.0
Expand Down

0 comments on commit 4f5f827

Please sign in to comment.