From e2996030acb024f977153c34ed9eab306757c6fd Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 3 Oct 2008 00:11:40 -0700 Subject: [PATCH] WebKit-specific hack to make the horizontal line under the title show up correctly. --- static/js/Editor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/js/Editor.js b/static/js/Editor.js index 5bcb4d7..0f41619 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -135,9 +135,15 @@ Editor.prototype.init_document = function () { // third and final stage of construction, invoked by init_document(). do not call directly Editor.prototype.finish_init = function () { - if ( !this.initial_text ) + if ( !this.initial_text ) { this.initial_text = "

"; + // WebKit hack: add a zero-width space to make the horizontal line under title show up in the + // correct position, even before there is a title + if ( WEBKIT ) + this.initial_text += "​"; + } + this.insert_html( this.initial_text ); // since the browser may subtly tweak the html when it's inserted, save off the browser's version