From f23281e31ead38a1cabbb73f0dbb8b36cb38cadb Mon Sep 17 00:00:00 2001 From: Tomohiro Suwa Date: Wed, 19 Apr 2017 02:35:55 +0900 Subject: Disable toot button when above 500 characters (#2088) * Disable toot button when above 500 characters * Consider multibyte characters * Consider spoiler_text --- .../components/features/compose/components/compose_form.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index c7df22765..fad77c8e9 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -131,6 +131,7 @@ const ComposeForm = React.createClass({ render () { const { intl, needsPrivacyWarning, mentionedDomains, onPaste } = this.props; const disabled = this.props.is_submitting; + const text = [this.props.spoiler_text, this.props.text].join(''); let publishText = ''; let privacyWarning = ''; @@ -197,8 +198,8 @@ const ComposeForm = React.createClass({
-
-
+
+
-- cgit