TagSpaces is an offline, open source, document manager with tagging support
fixing firefox scrolling css overlay issue
Ilian Sapundshievf537abaf7dd4
diff --git a/app/components/EntryContainer.js b/app/components/EntryContainer.jsindex c58725847..3e25d63b8 100644--- a/app/components/EntryContainer.js+++ b/app/components/EntryContainer.js@@ -924,7 +924,7 @@ class EntryContainer extends React.Component<Props, State> {{ currentEntry.isFile ?this.renderFileToolbar(classes) : this.renderFolderToolbar()}- <div style={{ overflowY: 'overlay', maxHeight: '100%' }}>+ <div style={{ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay', maxHeight: '100%' }}><EntryPropertiesentryPath={currentEntry.path}shouldReload={currentEntry.shouldReload}diff --git a/app/components/EntryProperties.js b/app/components/EntryProperties.jsindex 819c13765..cb06d7b73 100644--- a/app/components/EntryProperties.js+++ b/app/components/EntryProperties.js@@ -42,7 +42,7 @@ import PlatformIO from '../services/platform-io';const styles = theme => ({entryProperties: {- overflowY: 'overlay',+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',padding: 10},tags: {diff --git a/app/components/LocationManager.js b/app/components/LocationManager.jsindex 26ead91b0..4aef6ff93 100644--- a/app/components/LocationManager.js+++ b/app/components/LocationManager.js@@ -740,8 +740,8 @@ class LocationManager extends React.Component<Props, State> {className={classes.locationListArea}data-tid="locationList"style={{- maxHeight: 'calc(100vh - 70px)',- overflowY: 'overlay'+ maxHeight: 'calc(100vh - 80px)',+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'}}>{this.props.locations.map(this.renderLocation)}diff --git a/app/components/SidePanels.css.js b/app/components/SidePanels.css.jsindex baa6eaae2..43bff3484 100644--- a/app/components/SidePanels.css.js+++ b/app/components/SidePanels.css.js@@ -16,6 +16,7 @@** @flow*/+import AppConfig from '../config';export default (theme) => ({panel: {@@ -38,21 +39,21 @@ export default (theme) => ({marginTop: 0,marginBottom: 10,maxHeight: '100%',- overflowY: 'overlay'+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'},taggroupsArea: {paddingTop: 0,marginTop: 0,height: 'calc(100% - 50px)',maxHeight: 'calc(100% - 50px)',- overflowY: 'overlay'+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'},searchArea: {paddingTop: 0,paddingLeft: 5,marginTop: 0,maxHeight: '100%',- overflowY: 'overlay'+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'},topShadow: {borderTop: '1px solid lightgray',diff --git a/app/components/dialogs/AboutDialog.js b/app/components/dialogs/AboutDialog.jsindex 14b8ee392..979439f8b 100644--- a/app/components/dialogs/AboutDialog.js+++ b/app/components/dialogs/AboutDialog.js@@ -87,7 +87,7 @@ class AboutDialog extends React.Component<Props, State> {renderTitle = () => <DialogTitle>{productName}</DialogTitle>;renderContent = () => (- <DialogContent style={{ overflowY: 'overlay' }}>+ <DialogContent><imgalt="TagSpaces logo"src={LogoIcon}diff --git a/app/components/dialogs/CreateFileDialog.js b/app/components/dialogs/CreateFileDialog.jsindex 1fceab9c3..425a2157e 100644--- a/app/components/dialogs/CreateFileDialog.js+++ b/app/components/dialogs/CreateFileDialog.js@@ -52,7 +52,6 @@ const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',marginBottom: 30,background: theme.palette.background.paper},diff --git a/app/components/dialogs/DateCalendarDialog.js b/app/components/dialogs/DateCalendarDialog.jsindex d8b38aaa6..0fb0c6364 100644--- a/app/components/dialogs/DateCalendarDialog.js+++ b/app/components/dialogs/DateCalendarDialog.js@@ -40,7 +40,6 @@ const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',marginBottom: 30,// background: theme.palette.background.paper},diff --git a/app/components/dialogs/EditEntryTagDialog.js b/app/components/dialogs/EditEntryTagDialog.jsindex d660bcd04..83f5c3892 100644--- a/app/components/dialogs/EditEntryTagDialog.js+++ b/app/components/dialogs/EditEntryTagDialog.js@@ -34,7 +34,6 @@ const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',marginBottom: 30,// background: theme.palette.background.paper},diff --git a/app/components/dialogs/ImportExportTagGroupsDialog.js b/app/components/dialogs/ImportExportTagGroupsDialog.jsindex 9ad3bf552..f755127b3 100644--- a/app/components/dialogs/ImportExportTagGroupsDialog.js+++ b/app/components/dialogs/ImportExportTagGroupsDialog.js@@ -32,12 +32,13 @@ import TagGroupContainer from '../TagGroupContainer';import TagContainer from '../TagContainer';import i18n from '../../services/i18n';import { isFunc } from '../../utils/misc';+import AppConfig from '../../config';const styles = {root: {width: 400,height: '100%',- overflowY: 'overlay',+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',marginBottom: 30},};@@ -163,7 +164,7 @@ class ImportExportTagGroupsDialog extends React.Component<Props, State> {}};- renderTagGroups = (tagGroup, index) => {+ renderTagGroups = (tagGroup, index) => {return (<div key={tagGroup.uuid || tagGroup.key}><FormControl component="fieldset">@@ -199,25 +200,22 @@ class ImportExportTagGroupsDialog extends React.Component<Props, State> {renderTitle = () => {if (this.props.dialogModeImport) {return (<DialogTitle>{i18n.t('core:importGroupTagsTitle')}</DialogTitle>);- } else {- return (<DialogTitle>{i18n.t('core:exportGroupTagsTitle')}</DialogTitle>);}+ return (<DialogTitle>{i18n.t('core:exportGroupTagsTitle')}</DialogTitle>);};renderContent = () => {return (- <DialogContent style={{ overflowY: 'overlay' }}>- <div className={this.props.classes.root}>- <Button- color="primary"- onClick={this.handleToggleSelectAll}- >- {i18n.t('core:selectAllTagGroups')}- </Button>- <FormControl fullWidth={true}>- {this.state.tagGroupList.map(this.renderTagGroups)}- </FormControl>- </div>+ <DialogContent className={this.props.classes.root}>+ <Button+ color="primary"+ onClick={this.handleToggleSelectAll}+ >+ {i18n.t('core:selectAllTagGroups')}+ </Button>+ <FormControl fullWidth={true}>+ {this.state.tagGroupList.map(this.renderTagGroups)}+ </FormControl></DialogContent>);};@@ -231,7 +229,6 @@ class ImportExportTagGroupsDialog extends React.Component<Props, State> {disabled={this.state.disableConfirmButton}onClick={this.onConfirm}data-tid="confirmImportExport"- color="primary">{ this.props.dialogModeImport ? 'Import' : 'Export' }</Button>diff --git a/app/components/dialogs/KeyboardDialog.js b/app/components/dialogs/KeyboardDialog.jsindex 9395504a2..e19f8a0a9 100644--- a/app/components/dialogs/KeyboardDialog.js+++ b/app/components/dialogs/KeyboardDialog.js@@ -36,7 +36,6 @@ const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',marginBottom: 30,background: theme.palette.background.paper},@@ -64,7 +63,7 @@ class KeyboardDialog extends React.Component<Props> {renderTitle = () => <DialogTitle>{i18n.t('core:shortcutKeys')}</DialogTitle>;renderContent = () => (- <DialogContent style={{ overflowY: 'overlay' }}>+ <DialogContent><div className={this.props.classes.root} data-tid="keyboardShortCutsDialog">{this.props.keyBindings && Object.keys(this.props.keyBindings).map((shortcutKey) => (<ListItem key={shortcutKey}>diff --git a/app/components/dialogs/LicenseDialog.js b/app/components/dialogs/LicenseDialog.jsindex 05a3afa3a..14b6f2f0b 100644--- a/app/components/dialogs/LicenseDialog.js+++ b/app/components/dialogs/LicenseDialog.js@@ -60,7 +60,7 @@ class LicenseDialog extends React.Component<Props, State> {renderTitle = () => <DialogTitle>{i18n.t('core:license')}</DialogTitle>;renderContent = () => (- <DialogContent style={{ overflowY: 'overlay', overflowX: 'auto' }}>+ <DialogContent style={{ overflowY: 'visible', overflowX: 'auto' }}><pre>{ this.state.license }</pre></DialogContent>);diff --git a/app/components/dialogs/RenameFileDialog.js b/app/components/dialogs/RenameFileDialog.jsindex d770e198b..00b933af4 100644--- a/app/components/dialogs/RenameFileDialog.js+++ b/app/components/dialogs/RenameFileDialog.js@@ -54,7 +54,6 @@ const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',marginBottom: 30,background: theme.palette.background.paper}diff --git a/app/components/dialogs/SelectDirectoryDialog.js b/app/components/dialogs/SelectDirectoryDialog.jsindex 00405b3bb..572ae738e 100644--- a/app/components/dialogs/SelectDirectoryDialog.js+++ b/app/components/dialogs/SelectDirectoryDialog.js@@ -84,7 +84,7 @@ const styles = () => ({color: '#ff9800'},contentFolder: {- overflowY: 'overlay',+ overflowY: 'auto',maxHeight: '40vh'}});diff --git a/app/components/dialogs/ThirdPartyLibsDialog.js b/app/components/dialogs/ThirdPartyLibsDialog.jsindex d77d00cd4..36d28fc6f 100644--- a/app/components/dialogs/ThirdPartyLibsDialog.js+++ b/app/components/dialogs/ThirdPartyLibsDialog.js@@ -61,7 +61,7 @@ class ThirdPartyLibsDialog extends React.Component<Props, State> {renderTitle = () => <DialogTitle>{i18n.t('core:thirdPartyLibs')}</DialogTitle>;renderContent = () => (- <DialogContent style={{ overflowY: 'overlay', overflowX: 'auto' }}>+ <DialogContent style={{ overflowX: 'auto' }}><pre>{ this.state.thirdpartylibs }</pre></DialogContent>);diff --git a/app/components/settings/SettingsFileTypes.js b/app/components/settings/SettingsFileTypes.jsindex 64ba64b4a..ba327bf4d 100644--- a/app/components/settings/SettingsFileTypes.js+++ b/app/components/settings/SettingsFileTypes.js@@ -30,13 +30,14 @@ import ColorPickerDialog from '../dialogs/ColorPickerDialog';import { findAvailableExtensions } from '../../reducers/app';import { sortBy } from '../../utils/misc';import i18n from '../../services/i18n';+import AppConfig from '../../config';const styles = theme => ({root: {width: '100%',height: '100%',maxHeight: 520,- overflowY: 'overlay',+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',background: theme.palette.background.paper},fileExtension: {diff --git a/app/components/settings/SettingsGeneral.js b/app/components/settings/SettingsGeneral.jsindex c89b3f26a..6b6e963c7 100644--- a/app/components/settings/SettingsGeneral.js+++ b/app/components/settings/SettingsGeneral.js@@ -39,11 +39,12 @@ import {getSettings} from '../../reducers/settings';import ColorPickerDialog from '../dialogs/ColorPickerDialog';+import AppConfig from '../../config';const styles = theme => ({root: {maxHeight: 500,- overflowY: 'overlay'+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'},pro: {backgroundColor: '#1DD19F'diff --git a/app/components/settings/SettingsKeyBindings.js b/app/components/settings/SettingsKeyBindings.jsindex 3e272127d..afb120688 100644--- a/app/components/settings/SettingsKeyBindings.js+++ b/app/components/settings/SettingsKeyBindings.js@@ -35,12 +35,13 @@ import {} from '../../reducers/settings';import DefaultSettings from '../../reducers/settings-default';import { isStr } from '../../utils/misc';+import AppConfig from '../../config';const styles = theme => ({root: {width: 550,height: '100%',- overflowY: 'overlay',+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',maxHeight: 520,paddingTop: 15,paddingBottom: 40,diff --git a/app/config.js b/app/config.jsindex 81599c57d..a17b7ac6b 100644--- a/app/config.js+++ b/app/config.js@@ -39,6 +39,7 @@ export default {defaultFileColor: '#808080',defaultFolderColor: '#555', // transparent #FDEEBD #ff791b #2c001e #880e4fisElectron: (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1),+ isFirefox: (navigator.userAgent.toLowerCase().includes('firefox')), // typeof InstallTrigger !== 'undefined';isWin: navigator.appVersion.includes('Win'),isMacLike: navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i),isWeb: (document.URL.startsWith('http') && !document.URL.startsWith('http://localhost:1212/')),diff --git a/app/perspectives/grid-perspective/src/index.js b/app/perspectives/grid-perspective/src/index.jsindex 725293810..f3c1bed86 100644--- a/app/perspectives/grid-perspective/src/index.js+++ b/app/perspectives/grid-perspective/src/index.js@@ -129,7 +129,7 @@ const styles = theme => ({padding: 0,paddingTop: 5,zIndex: 100,- overflowY: 'overlay',+ overflowY: 'auto',overflowX: 'hidden',opacity: 0.6},@@ -1046,7 +1046,7 @@ class GridPerspective extends React.Component<Props, State> {<SwapVertIcon /></IconButton></Toolbar>- <div style={{ height: '100%', overflowY: 'overlay' }}>+ <div style={{ height: '100%', overflowY: AppConfig.isFirefox ? 'auto' : 'overlay' }}><divclassName={this.getLayoutClass()}ref={ref => {