Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable first line title parsing for Firefox #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] ) {
Expand Down
2 changes: 1 addition & 1 deletion js/views/new-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down