about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/composer/spoiler
diff options
context:
space:
mode:
authorpluralcafe-docker <docker@plural.cafe>2018-08-20 02:29:25 +0000
committerpluralcafe-docker <docker@plural.cafe>2018-08-20 02:29:25 +0000
commitc339d49d82b3fd2873831029d9c92b3fbf1236e3 (patch)
tree5a8528475f089f1e592dfbedd37ee91e6f748ffc /app/javascript/flavours/glitch/features/composer/spoiler
parentb6e9537de469a178ce195b75fe8eaf03735e785a (diff)
parentf4d28ccfa3f9fd38a6d219fcde2d1a8bfcf6b306 (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/features/composer/spoiler')
-rw-r--r--app/javascript/flavours/glitch/features/composer/spoiler/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/spoiler/index.js b/app/javascript/flavours/glitch/features/composer/spoiler/index.js
index d0e74b957..a7fecbcf5 100644
--- a/app/javascript/flavours/glitch/features/composer/spoiler/index.js
+++ b/app/javascript/flavours/glitch/features/composer/spoiler/index.js
@@ -33,6 +33,10 @@ const handlers = {
       onSubmit();
     }
   },
+
+  handleRefSpoilerText (spoilerText) {
+    this.spoilerText = spoilerText;
+  },
 };
 
 //  The component.
@@ -46,7 +50,7 @@ export default class ComposerSpoiler extends React.PureComponent {
 
   //  Rendering.
   render () {
-    const { handleKeyDown } = this.handlers;
+    const { handleKeyDown, handleRefSpoilerText } = this.handlers;
     const {
       hidden,
       intl,
@@ -68,6 +72,7 @@ export default class ComposerSpoiler extends React.PureComponent {
             placeholder={intl.formatMessage(messages.placeholder)}
             type='text'
             value={text}
+            ref={handleRefSpoilerText}
           />
         </label>
       </div>