1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Add tabindex to SelectWidget and docs (#7594)

This commit is contained in:
Scott Sauyet 2023-07-09 11:52:35 -04:00 committed by GitHub
parent eff158b1ae
commit f517497fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -145,6 +145,7 @@ SelectWidget.prototype.execute = function() {
this.selectDefault = this.getAttribute("default");
this.selectMultiple = this.getAttribute("multiple", false);
this.selectSize = this.getAttribute("size");
this.selectTabindex = this.getAttribute("tabindex");
this.selectTooltip = this.getAttribute("tooltip");
this.selectFocus = this.getAttribute("focus");
// Make the child widgets
@ -162,6 +163,9 @@ SelectWidget.prototype.execute = function() {
if(this.selectSize) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
}
if(this.selectTabindex) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"tabindex",this.selectTabindex);
}
if(this.selectTooltip) {
$tw.utils.addAttributeToParseTreeNode(selectNode,"title",this.selectTooltip);
}

View File

@ -41,7 +41,7 @@ The content of the `<$select>` widget should be one or more HTML `<option>` or `
|size |The number of rows to display in multiple selection mode |
|actions |A string containing ActionWidgets to be triggered when the key combination is detected |
|focus |<<.from-version "5.2.4">> Optional. Set to "yes" to automatically focus the HTML select element after creation |
|tabindex |<<.from-version "5.3.1">> Optional. Sets the `tabindex` attribute of the HTML select element to the given value |
! Examples
!! Simple Lists