Fix attributes not applied

This commit is contained in:
Leilei332 2025-11-29 08:42:18 +08:00
parent 48d7a30470
commit b287502383
2 changed files with 5 additions and 6 deletions

View file

@ -58,12 +58,10 @@ function SimpleEngine(options) {
if(this.widget.role) {
this.domNode.setAttribute("role",this.widget.role);
}
if(this.widget["aria-autocomplete"]) {
this.domNode.setAttribute("aria-autocomplete",this.widget["aria-autocomplete"]);
}
if(this.widget["aria-controls"]) {
this.domNode.setAttribute("aria-autocomplete",this.widget["aria-controls"]);
}
this.widget.assignAttributes(this.domNode,{
sourcePrefix: "aria-",
destPrefix: "aria-"
});
// Add an input event handler
$tw.utils.addEventListeners(this.domNode,[
{name: "focus", handlerObject: this, handlerMethod: "handleFocusEvent"},

View file

@ -184,6 +184,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
this.editInputActions = this.getAttribute("inputActions");
this.editRefreshTitle = this.getAttribute("refreshTitle");
this.editAutoComplete = this.getAttribute("autocomplete");
this.role = this.getAttribute("role");
this.isDisabled = this.getAttribute("disabled","no");
this.isFileDropEnabled = this.getAttribute("fileDrop","no") === "yes";
// Get the default editor element tag and type