-
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
Incorrect "CSS property: 'position: fixed'" error for elements that don't have position: fixed at all #7853
Comments
This issue might actually be what's going on (though my parent doesn't overlay the button at all, it's not even a direct parent) |
It gets even worse. Locally it now randomly fails with They use the exact same config... |
More information. Locally this issue only triggers when the Cypress window is not in the foreground. |
I see that you are using a very old version of Cypress. Please update to the current version of Cypress and let us know if this is still happening for you. Your issue may have already been fixed. Thanks! |
Unfortunately I'm stuck at this version because of Alpine. I'll look and see if we can get a more recent docker image to run, but I doubt it. |
Okay I was able to update everything to the latest version and I still have the issue. I think I'm closing in on the issue and it might be a rendering bug in headless Electron with z-index stacking. I'll try to illustrate what happens: Element 1 and 2 are siblings Element 1 has relative position and z-index 10, and pointer events none The Button to be clicked is inside Element 2 Waiting for Button Even though Element 1 is underneath Element 2 in the stacking order, somehow Electron renders Element 1 on top of Element 2, preventing clicks on Button |
Alright, after a long, long session with Jess to track down the issue, we were able to get relatively close to the issue(s) and it seems to be a combination of:
There's a layer with disabled pointer events underneath the fixed element with the button and that seems to return a false negative. |
Do we have a solution to it? |
The issue still exists in the last version of Cypress v12.5.1 and Chrome v109. scrollIntoView, click, realClick all with {force : true} are not working. |
Is there a way to remove the CSS property of the element position: fixed by force in the code? |
@scorpyto are you able to provide a reproducible example repo? |
@nagash77 Unfortunately I am not able to provide example as I am working with sensitive data and to create a new repo with mock data will take some time. While the element itself doesn't have "position: fixed" it is more like a global style setting in the html. I've tried something like:
And it somehow seems to work or it is just a coincidence... In Cypress GUI I see the invoke command as "invoke .attr()" without the changed position. |
Hi @scorpyto right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward. You may also want to check out our community chat, it can be helpful for debugging issues or just answering questions you have about Cypress. Someone there may be able to help you debug further or create a reproducible example that will allow us to revisit this issue. I am going to close this issue for now as we don't have a path forward but if you are able to provide a reproducible example in the future please do comment back here and we can reopen this issue. |
Current behavior:
Currently one of my tests (which is identical to a previous test in this regard) fails on an error that is simply incorrect.
It's showing:
which isn't at all true.
I don't have fixed positioned buttons at all, so this error is completely incorrect.
The stacktrace also shows "undefined" which is curious at best:
Desired behavior:
My test to pass, like it does locally (same version, same browser).
Test code to reproduce
Versions
3.4.1
Electron 61
Docker (Alpine)
The text was updated successfully, but these errors were encountered: