mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fixing scrolly bug on mobile
Summary: On mobile view not all rows are rendered when a section is expanded. Scrolly component calculates height of the GridView too soon (before animation is completed). With this change on mobile view we always take the screen height for calculation. A similar bug was on Card List, where cards were squeezed and their height was calculated to soon. Test Plan: Added test Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3748
This commit is contained in:
@@ -227,8 +227,13 @@ export function getSection(sectionOrTitle: string|WebElement): WebElement|WebEle
|
||||
* Click into a section without disrupting cursor positions.
|
||||
*/
|
||||
export async function selectSectionByTitle(title: string) {
|
||||
// .test-viewsection is a special 1px width element added for tests only.
|
||||
await driver.findContent(`.test-viewsection-title`, title).find(".test-viewsection-blank").click();
|
||||
try {
|
||||
// .test-viewsection is a special 1px width element added for tests only.
|
||||
await driver.findContent(`.test-viewsection-title`, title).find(".test-viewsection-blank").click();
|
||||
} catch (e) {
|
||||
// We might be in mobile view.
|
||||
await driver.findContent(`.test-viewsection-title`, title).findClosest(".view_leaf").click();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2319,9 +2324,8 @@ export function bigScreen() {
|
||||
/**
|
||||
* Shrinks browser window dimensions to trigger mobile mode for a test suite.
|
||||
*/
|
||||
export function narrowScreen() {
|
||||
export function narrowScreen() {
|
||||
resizeWindowForSuite(400, 750);
|
||||
|
||||
}
|
||||
|
||||
export async function addSupportUserIfPossible() {
|
||||
|
||||
Reference in New Issue
Block a user