Bug 686705 - Source Editor with the textarea fallback displays undefined without a placeholderText; r=mihai.sucan
authorPanos Astithas <past@mozilla.com>
Wed, 14 Sep 2011 10:25:43 -0700
changeset 78549 01ef83aa3f02aa7606eeda54b6381148da059324
parent 78548 7107a577e4f6dea4f96b3f6bac117698cdaa1aea
child 78550 31153dfd43070444318a813a6979ee01328dc445
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmihai
bugs686705
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 686705 - Source Editor with the textarea fallback displays undefined without a placeholderText; r=mihai.sucan
browser/devtools/sourceeditor/source-editor-textarea.jsm
--- a/browser/devtools/sourceeditor/source-editor-textarea.jsm
+++ b/browser/devtools/sourceeditor/source-editor-textarea.jsm
@@ -1,9 +1,9 @@
-/* vim:set ts=2 sw=2 sts=2 et tw=80:
+/* vim:set ft=javascript ts=2 sw=2 sts=2 et tw=80:
  * ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
  *
@@ -124,17 +124,17 @@ SourceEditor.prototype = {
     this._editor = this._textbox.editor;
 
     this._expandTab = aConfig.expandTab !== undefined ?
                       aConfig.expandTab : SourceEditor.DEFAULTS.EXPAND_TAB;
     this._tabSize = aConfig.tabSize || SourceEditor.DEFAULTS.TAB_SIZE;
 
     this._textbox.style.MozTabSize = this._tabSize;
 
-    this._textbox.setAttribute("value", aConfig.placeholderText);
+    this._textbox.setAttribute("value", aConfig.placeholderText || "");
     this._textbox.setAttribute("class", "monospace");
     this._textbox.style.direction = "ltr";
     this._textbox.readOnly = aConfig.readOnly;
 
     // Make sure that the SourceEditor Selection events are fired properly.
     // Also make sure that the Tab key inserts spaces when expandTab is true.
     this._textbox.addEventListener("select", this._onSelect.bind(this), false);
     this._textbox.addEventListener("keypress", this._onKeyPress.bind(this), false);