Skip to content

Commit

Permalink
fix(FEC-9409): portal doesn't close in ie11 (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBregman committed Oct 6, 2019
1 parent 35635cf commit b2b156b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/language/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const COMPONENT_NAME = 'Language';
class Language extends Component {
state: Object;
_controlLanguageElement: any;
// ie11 fix (FEC-7312) - don't remove
_portal: any;

/**
* before component mounted, set initial state
Expand Down Expand Up @@ -204,7 +206,12 @@ class Language extends Component {
</SmartContainer>
)}
{this.state.cvaaOverlay ? (
<Portal into={portalSelector}>
<Portal
into={portalSelector}
ref={ref =>
// ie11 fix (FEC-7312) - don't remove
(this._portal = ref)
}>
<CVAAOverlay
onClose={() => {
this.toggleCVAAOverlay();
Expand Down
10 changes: 9 additions & 1 deletion src/components/share/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const COMPONENT_NAME = 'Share';
* @extends {Component}
*/
class Share extends Component {
// ie11 fix (FEC-7312) - don't remove
_portal: any;

/**
* toggle overlay internal component state
*
Expand Down Expand Up @@ -86,7 +89,12 @@ class Share extends Component {
return (
<div>
{this.state.overlay ? (
<Portal into={portalSelector}>
<Portal
into={portalSelector}
ref={ref =>
// ie11 fix (FEC-7312) - don't remove
(this._portal = ref)
}>
<ShareOverlay
shareUrl={shareUrl}
embedUrl={embedUrl}
Expand Down
10 changes: 9 additions & 1 deletion src/components/smart-container/smart-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const COMPONENT_NAME = 'SmartContainer';
* @extends {Component}
*/
class SmartContainer extends Component {
// ie11 fix (FEC-7312) - don't remove
_portal: any;

/**
* before component mounted, add player css class
*
Expand Down Expand Up @@ -75,7 +78,12 @@ class SmartContainer extends Component {
render(props: any): React$Element<any> {
const portalSelector = `#${this.props.targetId} .overlay-portal`;
return props.isMobile || [PLAYER_SIZE.SMALL, PLAYER_SIZE.EXTRA_SMALL].includes(this.props.playerSize) ? (
<Portal into={portalSelector}>
<Portal
into={portalSelector}
ref={ref =>
// ie11 fix (FEC-7312) - don't remove
(this._portal = ref)
}>
<Overlay open onClose={() => props.onClose()}>
<div className={style.title}>{props.title}</div>
{props.children}
Expand Down

0 comments on commit b2b156b

Please sign in to comment.