mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-13 22:07:15 +00:00
Add new focus attribute to $select widget (#7081)
* Add focus attribute to $select widget This address https://github.com/Jermolene/TiddlyWiki5/issues/7070 * Update SelectWidget.tid Update the documentation for $select widget to include the new attribute: focus
This commit is contained in:
@@ -42,6 +42,9 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
this.renderChildren(parent,nextSibling);
|
||||
this.setSelectValue();
|
||||
if(this.selectFocus == "yes") {
|
||||
this.getSelectDomNode().focus();
|
||||
}
|
||||
$tw.utils.addEventListeners(this.getSelectDomNode(),[
|
||||
{name: "change", handlerObject: this, handlerMethod: "handleChangeEvent"}
|
||||
]);
|
||||
@@ -143,6 +146,7 @@ SelectWidget.prototype.execute = function() {
|
||||
this.selectMultiple = this.getAttribute("multiple", false);
|
||||
this.selectSize = this.getAttribute("size");
|
||||
this.selectTooltip = this.getAttribute("tooltip");
|
||||
this.selectFocus = this.getAttribute("focus");
|
||||
// Make the child widgets
|
||||
var selectNode = {
|
||||
type: "element",
|
||||
|
||||
Reference in New Issue
Block a user