@@ -31,13 +31,28 @@ var codeInput = {
31
31
textareaSyncAttributes : [
32
32
"aria-*" ,
33
33
"value" ,
34
- "name" ,
35
34
// Form validation - https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation
36
- "required" ,
37
- "minlength" , "maxlength" ,
38
35
"min" , "max" ,
39
36
"type" ,
40
- "pattern"
37
+ "pattern" ,
38
+
39
+ // Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
40
+ "autocomplete" ,
41
+ "autocorrect" ,
42
+ "autofocus" ,
43
+ "cols" ,
44
+ "dirname" ,
45
+ "disabled" ,
46
+ "form" ,
47
+ "maxlength" ,
48
+ "minlength" ,
49
+ "name" ,
50
+ "placeholder" ,
51
+ "readonly" ,
52
+ "required" ,
53
+ "rows" ,
54
+ "spellcheck" ,
55
+ "wrap"
41
56
] ,
42
57
43
58
/**
@@ -777,7 +792,8 @@ var codeInput = {
777
792
break ;
778
793
default :
779
794
if ( codeInput . textareaSyncAttributes . includes ( name ) ) {
780
- if ( newValue == null ) {
795
+ console . log ( "sync" , name , oldValue , newValue ) ;
796
+ if ( newValue == null || newValue == undefined ) { // TODO: Console.Log to check reaches here with disabled attribute; Fix for disabled attr removal
781
797
this . textareaElement . removeAttribute ( name ) ;
782
798
} else {
783
799
this . textareaElement . setAttribute ( name , newValue ) ;
@@ -939,27 +955,6 @@ var codeInput = {
939
955
return this . textareaElement . reportValidity ( ) ;
940
956
}
941
957
942
-
943
- /**
944
- * @override
945
- */
946
- setAttribute ( qualifiedName , value ) {
947
- super . setAttribute ( qualifiedName , value ) ; // code-input
948
- if ( this . textareaElement != null ) {
949
- this . textareaElement . setAttribute ( qualifiedName , value ) ; // textarea
950
- }
951
- }
952
-
953
- /**
954
- * @override
955
- */
956
- getAttribute ( qualifiedName ) {
957
- if ( this . textareaElement == null ) {
958
- return super . getAttribute ( qualifiedName ) ;
959
- }
960
- return this . textareaElement . getAttribute ( qualifiedName ) ; // textarea
961
- }
962
-
963
958
/**
964
959
* Allows plugins to store data in the scope of a single element.
965
960
* Key - name of the plugin
0 commit comments