Skip to content
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

The status bar does not disappear #7384

Closed
felis2803 opened this issue Nov 16, 2022 · 2 comments · Fixed by #7407
Closed

The status bar does not disappear #7384

felis2803 opened this issue Nov 16, 2022 · 2 comments · Fixed by #7407
Assignees
Labels
Support Center An issue created/received from the Support Center ticket. SYSTEM: UI TYPE: bug The described behavior is considered as wrong (bug).

Comments

@felis2803
Copy link
Contributor

felis2803 commented Nov 16, 2022

What is your Scenario?

I'm running a test in live mode, and I'm trying to access the elements at the bottom of the page.

What is the Current behavior?

The status bar does not disappear when hovering over it.

What is the Expected behavior?

The status bar should disappear.

What is your public website URL? (or attach your complete example)

See private ticket T1127746.

What is your TestCafe test code?

Any empty test on the page specified in private ticket T1127746.

Steps to Reproduce

  1. Run an empty test in live mode.
  2. Hover over the status bar.

TestCafe version

2.1.0

Node.js version

16.18.0

Command-line arguments

testcafe chrome test.js -L

Browser name(s) and version(s)

Chrome@107.0.5304.107

Platform(s) and version(s)

Windows 10

@felis2803 felis2803 added TYPE: bug The described behavior is considered as wrong (bug). SYSTEM: UI Support Center An issue created/received from the Support Center ticket. labels Nov 16, 2022
@AndreyBelym
Copy link
Contributor

It happens because the target page sets display: none on document.body in CSS during loading. This hides our status bar during initialization and we cannot correctly calculate the status bar height (it is 0 in this case) and use it in the mousemove event handler to determine if we should hide the panel or not.

const statusBarHeight = styleUtils.getHeight(this.statusBar);

if (e.clientY > this.windowHeight - statusBarHeight)

@AndreyBelym AndreyBelym self-assigned this Nov 30, 2022
AndreyBelym added a commit to AndreyBelym/testcafe that referenced this issue Dec 6, 2022
miherlosev pushed a commit that referenced this issue Dec 9, 2022
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose
When the document body is hidden (with `display: none`) during the page
initialization, the status bar cannot correctly calculate its height.
Later this calculated height is used to determine if the bar should hide
or not when the mouse is moving. When the height is not calculated
correctly, the bar will never hide.

## Approach
The status bar height is recalculated on each mouse move.

## References
Closes #7384.

## Pre-Merge TODO
- [x] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail
@github-actions
Copy link

Release v2.1.1-alpha.3 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Center An issue created/received from the Support Center ticket. SYSTEM: UI TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants