about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgeta6 <getakura@gmail.com>2017-05-16 19:12:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-16 12:12:38 +0200
commitbbaac89eb080e6f0a5832de2333025d0c4be2209 (patch)
treed0387f29778660f935284b6a0089c8a3e203beeb
parent0dfffb6dcb48f881a39c17841ce8f02087d219d6 (diff)
Enable to handle app immediately after closing modal (#3082)
-rw-r--r--app/javascript/mastodon/features/ui/components/modal_root.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js
index 3596b2812..c4015a119 100644
--- a/app/javascript/mastodon/features/ui/components/modal_root.js
+++ b/app/javascript/mastodon/features/ui/components/modal_root.js
@@ -48,9 +48,10 @@ class ModalRoot extends React.PureComponent {
 
   render () {
     const { type, props, onClose } = this.props;
+    const visible = !!type;
     const items = [];
 
-    if (!!type) {
+    if (visible) {
       items.push({
         key: type,
         data: { type, props },
@@ -69,7 +70,7 @@ class ModalRoot extends React.PureComponent {
               const SpecificComponent = MODAL_COMPONENTS[type];
 
               return (
-                <div key={key}>
+                <div key={key} style={{ pointerEvents: visible ? 'auto' : 'none' }}>
                   <div role='presentation' className='modal-root__overlay' style={{ opacity: style.opacity }} onClick={onClose} />
                   <div className='modal-root__container' style={{ opacity: style.opacity, transform: `translateZ(0px) scale(${style.scale})` }}>
                     <SpecificComponent {...props} onClose={onClose} />