mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-13 05:15:44 +00:00
Merge pull request #1141 from tobibeer/auto-focus-title-on-edit
#371 focus title field on edit
This commit is contained in:
@@ -71,6 +71,13 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
|
||||
}
|
||||
// Fix height
|
||||
this.fixHeight();
|
||||
|
||||
// Focus field
|
||||
if(this.editFocus === "true") {
|
||||
domNode.focus();
|
||||
domNode.select();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -140,6 +147,8 @@ EditTextWidget.prototype.execute = function() {
|
||||
this.editAutoHeight = this.getAttribute("autoHeight","yes") === "yes";
|
||||
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
this.editFocus = this.getAttribute("focus");
|
||||
|
||||
// Get the editor element tag and type
|
||||
var tag,type;
|
||||
if(this.editField === "text") {
|
||||
|
||||
Reference in New Issue
Block a user