Skip to content

Commit

Permalink
fix: avoid overflow issue in Firefox (#22620)
Browse files Browse the repository at this point in the history
* fix: update positioning of runner

* remove isFirefox check

* Update packages/app/src/runner/useRunnerStyle.ts

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>

Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
  • Loading branch information
marktnoonan and ZachJW34 authored Jul 12, 2022
1 parent 871e54f commit 1ccc905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/app/src/runner/ResizablePanels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class="flex"
:class="{
'select-none': panel1IsDragging || panel2IsDragging,
'overflow-x-hidden': isFirefox
}"
@mouseup="handleMouseup"
@mousemove="handleMousemove"
Expand Down Expand Up @@ -208,7 +207,4 @@ watchEffect(() => {
}
})
// TODO: UNIFY-1704 - avoid special case for FF
const isFirefox = window.__CYPRESS_BROWSER__?.family === 'firefox'
</script>
5 changes: 5 additions & 0 deletions packages/app/src/runner/useRunnerStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ export const useRunnerStyle = () => {
})

const viewportStyle = computed(() => {
// in the below styles, `position: absolute` is required to avoid certain edge cases
// that can happen with overflow (mainly, in Firefox, but not always)
// see this issue for details: https://github.com/cypress-io/cypress/issues/21881

let style = `
width: ${autStore.viewportDimensions.width}px;
height: ${autStore.viewportDimensions.height}px;
transform: scale(${scale.value});
position: absolute;
`

// to keep the AUT iframe centered during scaling, we need to calculate the difference between
Expand Down

5 comments on commit 1ccc905

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1ccc905 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/linux-x64/develop-1ccc90573ff0d2067db474fc6e407e446a4803e6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1ccc905 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/linux-arm64/develop-1ccc90573ff0d2067db474fc6e407e446a4803e6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1ccc905 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/darwin-arm64/develop-1ccc90573ff0d2067db474fc6e407e446a4803e6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1ccc905 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/darwin-x64/develop-1ccc90573ff0d2067db474fc6e407e446a4803e6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1ccc905 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.3.1/win32-x64/develop-1ccc90573ff0d2067db474fc6e407e446a4803e6/cypress.tgz

Please sign in to comment.