@@ -85,8 +85,6 @@ export function RegularElement(node, context) {
85
85
const is_custom_element = is_custom_element_node ( node ) ;
86
86
let needs_content_reset = false ;
87
87
88
- let is_content_editable = false ;
89
-
90
88
if ( is_custom_element ) {
91
89
// cloneNode is faster, but it does not instantiate the underlying class of the
92
90
// custom element until the template is connected to the dom, which would
@@ -119,12 +117,6 @@ export function RegularElement(node, context) {
119
117
! is_text_attribute ( attribute )
120
118
) {
121
119
needs_content_reset = true ;
122
- } else if (
123
- attribute . name === 'contenteditable' &&
124
- ( attribute . value === true ||
125
- ( is_text_attribute ( attribute ) && attribute . value [ 0 ] . data === 'true' ) )
126
- ) {
127
- is_content_editable = true ;
128
120
}
129
121
} else if ( attribute . type === 'SpreadAttribute' ) {
130
122
has_spread = true ;
@@ -156,9 +148,17 @@ export function RegularElement(node, context) {
156
148
}
157
149
}
158
150
159
- child_metadata . bound_contenteditable =
160
- is_content_editable &&
161
- ( bindings . has ( 'innerHTML' ) || bindings . has ( 'innerText' ) || bindings . has ( 'textContent' ) ) ;
151
+ if ( bindings . has ( 'innerHTML' ) || bindings . has ( 'innerText' ) || bindings . has ( 'textContent' ) ) {
152
+ const contenteditable = lookup . get ( 'contenteditable' ) ;
153
+
154
+ if (
155
+ contenteditable &&
156
+ ( contenteditable . value === true ||
157
+ ( is_text_attribute ( contenteditable ) && contenteditable . value [ 0 ] . data === 'true' ) )
158
+ ) {
159
+ child_metadata . bound_contenteditable = true ;
160
+ }
161
+ }
162
162
163
163
if (
164
164
node . name === 'input' &&
0 commit comments