diff --git a/lib/redux/ui/ui_state.dart b/lib/redux/ui/ui_state.dart index f54130136..e5eaa1fd7 100644 --- a/lib/redux/ui/ui_state.dart +++ b/lib/redux/ui/ui_state.dart @@ -193,6 +193,8 @@ abstract class UIState implements Built { currentRoute.endsWith('/edit') || currentRoute.endsWith('refund'); + bool get isInPdf => currentRoute.endsWith('/pdf'); + bool get isEmailing => currentRoute.endsWith('/email'); bool get isViewing => !isEditing && !isEmailing; diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index bd6058479..08eb6519b 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -658,7 +658,10 @@ class SidebarFooter extends StatelessWidget { ), IconButton( icon: Icon(Icons.info_outline), - onPressed: () => _showAbout(context), + // prevent the modal from being stuck over the pdf + onPressed: state.uiState.isInPdf && kIsWeb + ? null + : () => _showAbout(context), tooltip: localization.about, ), /*