From 57469f135471f15f60d1da0f15d544368e4ffae9 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Tue, 17 Dec 2019 17:29:24 -0800 Subject: [PATCH] Enable first line title parsing for Firefox --- js/editor/editor.js | 5 +---- js/views/new-post.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/js/editor/editor.js b/js/editor/editor.js index f8c4911..7d78871 100644 --- a/js/editor/editor.js +++ b/js/editor/editor.js @@ -721,10 +721,7 @@ o2Editor = { firstLineIsProbablyATitle: function( text ) { // Firefox isn't doesn't obey ::first-line in textareas, - // so let's disable auto title. - if ( o2Editor.isFirefox ) { - return false; - } + // This is not true. https://caniuse.com/#feat=css-first-line var lines = text.split('\n'); if ( ! lines || 1 === lines.length && '' === lines[0] ) { diff --git a/js/views/new-post.js b/js/views/new-post.js index ccd296d..33157be 100644 --- a/js/views/new-post.js +++ b/js/views/new-post.js @@ -106,7 +106,7 @@ o2.Views.FrontSidePost = ( function( $ ) { titleFiltered: titleRaw, contentFiltered: contentFiltered, isFollowing: isFollowing, - disableAutoTitle: o2Editor.isFirefox, // Force auto-title off in Firefox + disableAutoTitle: false, postFormat: this.options.viewFormat // retrieve from the view } ); o2.App.posts.add( clientModel ); // @todo we've made the view coupled to the app here - could we use an event?