Skip to content

Commit

Permalink
Fix color chooser interaction with stop propagation moved to native e…
Browse files Browse the repository at this point in the history
…vent
  • Loading branch information
alisman committed Jun 8, 2022
1 parent 4cb5ff3 commit b1e6bb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
32 changes: 16 additions & 16 deletions src/pages/groupComparison/comparisonGroupManager/GroupCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ export default class GroupCheckbox extends React.Component<
this.props.shareGroup(this.props.group);
}

@autobind
private onOverlayEnter() {
this.props.store.numberOfVisibleColorChooserModals += 1;
}

@autobind
private onOverlayExit() {
this.props.store.numberOfVisibleColorChooserModals -= 1;
}
// @autobind
// private onOverlayEnter() {
// this.props.store.numberOfVisibleColorChooserModals += 1;
// }
//
// @autobind
// private onOverlayExit() {
// this.props.store.numberOfVisibleColorChooserModals -= 1;
// }

@computed get label() {
return (
Expand Down Expand Up @@ -230,19 +230,19 @@ export default class GroupCheckbox extends React.Component<
trigger="click"
placement="bottom"
overlay={this.buildColorChooserWidget()}
onEnter={this.onOverlayEnter}
onExit={this.onOverlayExit}
// onEnter={this.onOverlayEnter}
// onExit={this.onOverlayExit}
rootClose={true}
>
<DefaultTooltip
overlay={
'Optional: Select color for group to be used in group comparison. If no color is selected, a random color will be applied.'
}
disabled={
this.props.store
.numberOfVisibleColorChooserModals >
0
}
// disabled={
// this.props.store
// .numberOfVisibleColorChooserModals >
// 0
// }
>
<span
style={{
Expand Down
9 changes: 0 additions & 9 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ export default class StudyViewPage extends React.Component<
{/* </InfoBeacon>*/}
{/*</If>*/}
<DefaultTooltip
visible={this.store.showComparisonGroupUI}
trigger={['click']}
placement="bottomLeft"
destroyTooltipOnHide={true}
Expand All @@ -412,14 +411,6 @@ export default class StudyViewPage extends React.Component<
);
arrowEl.style.right = '10px';
}}
onVisibleChange={visible => {
if (
this.store.numberOfVisibleColorChooserModals == 0 &&
!this.shareLinkModal
) {
this.store.showComparisonGroupUI = !!visible;
}
}}
getTooltipContainer={() =>
document.getElementById(
'comparisonGroupManagerContainer'
Expand Down

0 comments on commit b1e6bb2

Please sign in to comment.