From 4f4d45a97295e8813f11e7bdc1a28619c681189a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 1 Nov 2013 12:43:23 +0000 Subject: [PATCH] Fix problem with default attribute of edit-text widget Setting `default=""` wasn't working --- core/modules/new_widgets/edit-text.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/new_widgets/edit-text.js b/core/modules/new_widgets/edit-text.js index 516950b94..b5d1f0d49 100644 --- a/core/modules/new_widgets/edit-text.js +++ b/core/modules/new_widgets/edit-text.js @@ -95,7 +95,7 @@ EditTextWidget.prototype.getEditInfo = function() { value = ""; break; } - if(this.editDefault) { + if(this.editDefault !== undefined) { value = this.editDefault; } } @@ -111,7 +111,7 @@ EditTextWidget.prototype.execute = function() { this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.editField = this.getAttribute("field","text"); this.editIndex = this.getAttribute("index"); - this.editDefault = this.getAttribute("default",""); + this.editDefault = this.getAttribute("default"); this.editClass = this.getAttribute("class"); this.editPlaceholder = this.getAttribute("placeholder"); this.editFocusPopup = this.getAttribute("focusPopup");