For inline elements that wrap lines, the click funtion misses when the first child element has no width
See original GitHub issueCurrent behavior:
For inline elements that wrap lines, sometimes the center of the bounding rect is not actually part of the element. So the first client rect is used in order to ensure that the click
function does not miss when it attempts to click the element. In rare cases, this element may actually have no width, which results in a missed click as well.
Desired behavior:
The click
function should always properly click the element.
Test code to reproduce
<div style="width: 30px; line-height: 2;">
<a href="#" id="overflow-link-width">
<i style="display: inline-block;"></i>
foofoofoofoofoo bar
</a>
</div>
cy.get('#overflow-link-width').click()
Versions
4.5.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Inline elements - HTML: HyperText Markup Language | MDN
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the...
Read more >Why is this inline-block element pushed downward?
And I know that its overflow:hidden; which is causing it but not sure that why its pushing that div downward. body { width:...
Read more >Fighting the Space Between Inline Block Elements | CSS-Tricks
A series of inline-block elements with "normal" HTML formatting result in spaces between them when set on the same line.
Read more >How to prevent inline-block divs from wrapping - GeeksforGeeks
The display: inline-block; is a layout property in CSS that does not add a line break after the element. As a result, the...
Read more >Docs • Svelte
The value attribute of an input element or its children option elements must not be set with spread attributes when using bind:group or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jennifer-shehane Yeah that’s the issue, Brian had indicated I had to open a new issue but I guess I was mistaken. I can close this issue and link the PR to that one.
Released in
4.8.0
.This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v4.8.0, please open a new issue.