From 42c22acba629030e3a016cd4a758a3cb17ac453a Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Mon, 27 Jan 2025 12:00:07 +0100 Subject: [PATCH] Cleans up cruft from edit widget (#8897) * chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget * chore: cleanup cruft from edit widget --- core/modules/widgets/edit.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index eb7758e90..e4433e1da 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -43,15 +43,6 @@ EditWidget.prototype.execute = function() { // Get our parameters this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.editField = this.getAttribute("field","text"); - this.editIndex = this.getAttribute("index"); - this.editClass = this.getAttribute("class"); - this.editPlaceholder = this.getAttribute("placeholder"); - this.editTabIndex = this.getAttribute("tabindex"); - this.editFocus = this.getAttribute("focus",""); - this.editCancelPopups = this.getAttribute("cancelPopups",""); - this.editInputActions = this.getAttribute("inputActions"); - this.editRefreshTitle = this.getAttribute("refreshTitle"); - this.editAutoComplete = this.getAttribute("autocomplete"); // Choose the appropriate edit widget this.editorType = this.getEditorType(); // Make the child widgets @@ -89,8 +80,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - // Refresh if an attribute has changed, or the type associated with the target tiddler has changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) { + // Refresh if the editor type has changed + if(changedAttributes.tiddler || changedAttributes.field || (this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else {