Skip to content

Commit

Permalink
fix: Data browser dialog "No data to display" may be outside of visib…
Browse files Browse the repository at this point in the history
…le area in Safari browser (#2387)
  • Loading branch information
Damian Stasik authored Feb 13, 2023
1 parent dc18f7e commit 52bba62
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
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);
}

0 comments on commit 52bba62

Please sign in to comment.