(core) Avoid reporting unhelpful ResizeObserver error

Summary: The error appears to be benign and not caused by any of our code.

Test Plan:
Reproducing was tricky.

On the Access Rules page, changing the browser's zoom level caused the error to surface. Weirdly enough, it only happened when connected to a larger, external monitor, and not on my laptop's internal monitor.

In any case, manual testing was done to confirm the error is no longer reported to the user after this change.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4095
This commit is contained in:
George Gevoian
2023-10-25 10:32:46 -04:00
parent ce23887be0
commit cb0ce9b20f
2 changed files with 35 additions and 12 deletions

View File

@@ -1322,7 +1322,7 @@ class SpecialSchemaObsRuleSet extends SpecialObsRuleSet {
protected _buildDomWarning(): DomContents {
return dom.maybe(
(use) => use(this._body).every(rule => rule.isBuiltInOrEmpty(use)),
() => cssConditionError({style: 'margin-left: 56px; margin-bottom: 8px;'},
() => cssError(
t("This default should be changed if editors' access is to be limited. "),
dom('a', {style: 'color: inherit; text-decoration: underline'},
'Dismiss', dom.on('click', () => this._allowEditors('confirm'))),
@@ -1969,10 +1969,17 @@ const cssInput = styled(textInput, `
}
`);
const cssError = styled('div', `
color: ${theme.errorText};
margin-left: 56px;
margin-bottom: 8px;
margin-top: 4px;
`);
const cssConditionError = styled('div', `
color: ${theme.errorText};
margin-top: 4px;
width: 100%;
color: ${theme.errorText};
`);
/**