Skip to content

fix: Data browser dialog "No data to display" may be outside of visible area in Safari browser #2387

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

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/dashboard/Data/Browser/Browser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
bottom: 0;
overflow: auto;
padding-top: 30px;
// fix for safari scrolling issue:
// https://css-tricks.com/forums/topic/safari-for-ios-z-index-ordering-bug-while-scrolling-a-page-with-a-fixed-element/
// only applying to safari as a side effect of this is emptystate component centering is off
&.safari {
-webkit-transform: translate3d(0,0,0);
}
}

body:global(.expanded) {
Expand Down
3 changes: 1 addition & 2 deletions src/dashboard/Data/Browser/BrowserTable.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* the root directory of this source tree.
*/
import BrowserRow from 'components/BrowserRow/BrowserRow.react';
import * as browserUtils from 'lib/browserUtils';
import DataBrowserHeaderBar from 'components/DataBrowserHeaderBar/DataBrowserHeaderBar.react';
import Editor from 'dashboard/Data/Browser/Editor.react';
import EmptyState from 'components/EmptyState/EmptyState.react';
Expand Down Expand Up @@ -429,7 +428,7 @@ export default class BrowserTable extends React.Component {
}

return (
<div className={[styles.browser, browserUtils.isSafari() ? styles.safari : ''].join(' ')}>
<div className={styles.browser}>
{table}
<DataBrowserHeaderBar
selected={
Expand Down
4 changes: 0 additions & 4 deletions src/lib/browserUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
* the root directory of this source tree.
*/

export function isSafari() {
return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
}

export function isChrome() {
return /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
}