mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-17 15:21:22 +00:00
Adding optional tabindex attr to simple, framed and cm engines (#3756)
* add optional tabindex attribute to factory.js * add changedAttributes.tabindex to refresh mechanic * add optional tabindex attribute to edit widget * remove some extra whitespace * remove some trailing whitespace * add optional tabindex attribute to simple engine * add optional tabindex attribute to framed engine * add optional tabindex attribute to cm engine
This commit is contained in:
committed by
Jeremy Ruston
parent
9d7d3fefa0
commit
f97d18bb6e
@@ -70,6 +70,9 @@ function FramedEngine(options) {
|
||||
if(this.widget.editRows) {
|
||||
this.domNode.setAttribute("rows",this.widget.editRows);
|
||||
}
|
||||
if(this.widget.editTabIndex) {
|
||||
this.iframeNode.setAttribute("tabindex",this.widget.editTabIndex);
|
||||
}
|
||||
// Copy the styles from the dummy textarea
|
||||
this.copyStyles();
|
||||
// Add event listeners
|
||||
|
||||
@@ -49,6 +49,9 @@ function SimpleEngine(options) {
|
||||
if(this.widget.editClass) {
|
||||
this.domNode.className = this.widget.editClass;
|
||||
}
|
||||
if(this.widget.editTabIndex) {
|
||||
this.domNode.setAttribute("tabindex",this.widget.editTabIndex);
|
||||
}
|
||||
// Add an input event handler
|
||||
$tw.utils.addEventListeners(this.domNode,[
|
||||
{name: "focus", handlerObject: this, handlerMethod: "handleFocusEvent"},
|
||||
|
||||
Reference in New Issue
Block a user