瀏覽代碼

fix counter for buttons

Markus-Rost 4 年之前
父節點
當前提交
1017cb00ee
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      dashboard/src/index.js

+ 2 - 2
dashboard/src/index.js

@@ -404,6 +404,7 @@ if ( textAreas.length ) {
 			textArea.value = textArea.value.substring(0, start) + valueBefore + textArea.value.substring(end);
 			textArea.value = textArea.value.substring(0, start) + valueBefore + textArea.value.substring(end);
 			textArea.selectionStart = textArea.selectionEnd = start + valueBefore.length;
 			textArea.selectionStart = textArea.selectionEnd = start + valueBefore.length;
 		}
 		}
+		updateTextLength.call(textArea);
 		textArea.focus();
 		textArea.focus();
 	}
 	}
 
 
@@ -425,9 +426,8 @@ if ( textAreas.length ) {
 
 
 	/**
 	/**
 	 * @this HTMLTextAreaElement
 	 * @this HTMLTextAreaElement
-	 * @param {KeyboardEvent} e
 	 */
 	 */
-	function updateTextLength(e) {
+	function updateTextLength() {
 		this.labels.item(0).children.item(0).textContent = this.value.length + ' / ' + this.maxLength;
 		this.labels.item(0).children.item(0).textContent = this.value.length + ' / ' + this.maxLength;
 	}
 	}
 }
 }