From 81930a85871cfb0c0dab22c9cb91e65b570b7be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?= <janis.daehne2@student.uni-halle.de> Date: Wed, 12 Jun 2019 18:34:55 +0200 Subject: [PATCH] - fixed issue on the do exercis site where the manage files dialog was in front of the interception dialog --- src/components/helpers/InterceptOverlay.tsx | 8 +++----- src/components/sites/doExerciseSite/doExerciseSite.tsx | 4 +++- src/styles/behaviors.styl | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/helpers/InterceptOverlay.tsx b/src/components/helpers/InterceptOverlay.tsx index c4cb4b98..50b20917 100644 --- a/src/components/helpers/InterceptOverlay.tsx +++ b/src/components/helpers/InterceptOverlay.tsx @@ -13,14 +13,12 @@ import {Dimmer} from "semantic-ui-react"; export interface MyProps { //readonly test: string - readonly opacity?: number } const mapStateToProps = (rootState: RootState , props: MyProps) => { return { //test0: rootState... //test: props.test - opacity: props.opacity, } } @@ -41,8 +39,8 @@ type Props = typeof stateProps & typeof dispatchProps; class InterceptOverlay extends React.Component<Props, any> { render(): JSX.Element { return ( - <div> - <Dimmer active inverted style={{opacity: this.props.opacity}} > + <div className="interception-overlay"> + <Dimmer active inverted> { this.props.children } @@ -52,4 +50,4 @@ class InterceptOverlay extends React.Component<Props, any> { } } -export default connect(mapStateToProps, mapDispatchToProps)(InterceptOverlay) \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(InterceptOverlay) diff --git a/src/components/sites/doExerciseSite/doExerciseSite.tsx b/src/components/sites/doExerciseSite/doExerciseSite.tsx index 8d43505c..5208a0f6 100644 --- a/src/components/sites/doExerciseSite/doExerciseSite.tsx +++ b/src/components/sites/doExerciseSite/doExerciseSite.tsx @@ -578,6 +578,8 @@ class doExerciseSite extends React.Component<Props & RouteComponentProps<Matched /** * called when the tab changed (or when minimized) * but NOT when the user changes windows focus + * + * the interception overlay is sometimes not working (especially if the do exercise sit loaded) and then we click outside...) */ onPageVisibilityChanged(): void { @@ -976,7 +978,7 @@ class doExerciseSite extends React.Component<Props & RouteComponentProps<Matched } { - //first display got focus again interception overlay than this + //first display got focus again interception overlay then this this.props.lockSolutionsFlagAndIsStillOpen && this.props.isOnGotFocusInterceptionOverlayDisplayed === false && <LockSolutionOverlay> <p className="fg-colored" style={{fontSize: '16px'}}> diff --git a/src/styles/behaviors.styl b/src/styles/behaviors.styl index 2790d5ce..9505f639 100644 --- a/src/styles/behaviors.styl +++ b/src/styles/behaviors.styl @@ -91,6 +91,10 @@ bool ? clickable-toggled : clickable cursor pointer } +.interception-overlay .ui.active.dimmer{ + z-index 2000 //others dimmers/overlays have 1000 +} + // ---- printing --- -- GitLab