FIX: allow pasting links into title field that are longer than the max title length

This commit is contained in:
Neil Lalonde
2017-05-18 12:32:35 -04:00
parent 29755be139
commit dbb814ec6a
4 changed files with 22 additions and 3 deletions
@@ -31,6 +31,13 @@ export default Ember.Component.extend({
}
},
@computed('watchForLink')
titleMaxLength() {
// maxLength gets in the way of pasting long links, so don't use it if featured links are allowed.
// Validation will display a message if titles are too long.
return this.get('watchForLink') ? null : this.siteSettings.max_topic_title_length;
},
@observes('composer.titleLength', 'watchForLink')
_titleChanged() {
if (this.get('composer.titleLength') === 0) { this.set('autoPosted', false); }