-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 28638 parent absolute #29689
base: release/14.0.0
Are you sure you want to change the base?
fix: 28638 parent absolute #29689
Changes from 9 commits
d2ffbec
46e07c0
72b37f6
1366587
a7d3b83
9494a26
43e3b62
d206d96
a5e7b11
e4eaa52
c5548ee
b7aba89
d8a11d1
53aeba9
9749a4d
95db079
d1c658f
ca8da1b
bb57298
2d1c953
6af9ba6
c34636c
90d4f6a
de42b7d
07f5b2c
397b5c1
595dc90
51e9113
4b82d6f
b1ce61f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -367,8 +367,8 @@ describe('src/cypress/dom/visibility', () => { | |
`) | ||
|
||
this.$elOutOfParentBoundsAbove = add(`\ | ||
<div style='width: 100px; height: 100px; overflow: hidden; position: relative;'> | ||
<span style='position: absolute; width: 100px; height: 100px; left: 0px; top: -100px;'>position: absolute, out of bounds above</span> | ||
<div style='width: 100px; height: 100px; overflow: hidden; position: fixed;'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain this change more fully? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed to firefox to behave like other browsers in this tests. Test check el out of bound and this not changed. And in browser it could be seen as same. But Firefox do not like combination of relative and absolute. Maybe in future it will behave same as other browsers. But for pipeline Firefox version this seems like simple walkaround. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively test could stay not changed and { browser: '!firefox' } added to this test. |
||
<span id='elOutOfParentBoundsAbove' style='position: absolute; width: 100px; height: 100px; left: 0px; top: -100px;'>position: absolute, out of bounds above</span> | ||
</div>\ | ||
`) | ||
|
||
|
@@ -833,7 +833,7 @@ describe('src/cypress/dom/visibility', () => { | |
}) | ||
|
||
it('is hidden when parent overflow hidden and out of bounds above', function () { | ||
expect(this.$elOutOfParentBoundsAbove.find('span')).to.be.hidden | ||
expect(this.$elOutOfParentBoundsAbove.find('span#elOutOfParentBoundsAbove')).to.be.hidden | ||
}) | ||
|
||
it('is hidden when parent overflow hidden and out of bounds below', function () { | ||
|
@@ -1170,10 +1170,7 @@ describe('src/cypress/dom/visibility', () => { | |
}) | ||
|
||
it('element is fixed and being covered', function () { | ||
this.reasonIs(this.$coveredUpPosFixed.find('#coveredUpPosFixed'), `\ | ||
This element \`<div#coveredUpPosFixed>\` is not visible because it has CSS property: \`position: fixed\` and it's being covered by another element: | ||
|
||
\`<div style="position: fixed; bottom: 0; left: 0">on top</div>\``) | ||
this.reasonIs(this.$coveredUpPosFixed.find('#coveredUpPosFixed'), `\This element \`<div#coveredUpPosFixed>\` is not visible because it has CSS property: \`position: fixed\` and it's being covered by another element:\`<div style="position: fixed; bottom: 0; left: 0">on top</div>\``) | ||
}) | ||
|
||
it('needs scroll', function () { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// https://github.com/cypress-io/cypress/issues/28638 | ||
describe('issue 28638', () => { | ||
before(() => { | ||
cy | ||
.viewport(400, 400) | ||
.visit('/fixtures/issue-28638.html') | ||
}) | ||
|
||
it('can click with parent position absolute', () => { | ||
cy.get('#visible-button').click() | ||
}) | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<body> | ||
<div style="height: 200px; position: relative; display: flex"> | ||
<div style="border: 5px solid red"> | ||
<div | ||
id="breaking-container" | ||
style="overflow: auto; border: 5px solid green" | ||
> | ||
<div> | ||
<h1>Example</h1> | ||
<div style="position: absolute; bottom: 5px"> | ||
<button id="visible-button" style="position: relative"> | ||
Try me | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this belong here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And it's required by pipeline. Of course position could be discussed but it's fix issue reported by user so probably should be in Bugfixes