From 39f0c19c9a3ddd386aa065283e2d3071f2e7a905 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 29 Apr 2016 17:02:42 +0100 Subject: [PATCH] Allow "yes" as a synonym of "true" For consistency --- core/modules/editor/factory.js | 2 +- editions/tw5.com/tiddlers/widgets/EditTextWidget.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index e2ea8dce5..c04c21c69 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -70,7 +70,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { // Fix height this.engine.fixHeight(); // Focus if required - if(this.editFocus === "true") { + if(this.editFocus === "true" || this.editFocus === "yes") { this.engine.focus(); } // Add widget message listeners diff --git a/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid b/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid index b4e7c3c31..6f2224e53 100644 --- a/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid @@ -23,7 +23,7 @@ The content of the `<$edit-text>` widget is ignored. |class |A CSS class to be assigned to the generated HTML editing element | |placeholder |Placeholder text to be displayed when the edit field is empty | |focusPopup |Title of a state tiddler for a popup that is displayed when the editing element has focus | -|focus |Set to "true" to automatically focus the editor after creation | +|focus |Set to "yes" or "true" to automatically focus the editor after creation | |tag |Overrides the generated HTML editing element tag. Use `textarea` for a multi-line editor | |type |Overrides the generated HTML editing element `type` attribute | |size |The size of the input field (in characters) |