File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,7 @@ options.vnode = vnode => {
123
123
if ( IS_DOM && i === 'children' && type === 'noscript' ) {
124
124
// Emulate React's behavior of not rendering the contents of noscript tags on the client.
125
125
continue ;
126
- }
127
- else if ( i === 'value' && 'defaultValue' in props && value == null ) {
126
+ } else if ( i === 'value' && 'defaultValue' in props && value == null ) {
128
127
// Skip applying value if it is null/undefined and we already set
129
128
// a default value
130
129
continue ;
@@ -154,7 +153,7 @@ options.vnode = vnode => {
154
153
i = 'onfocusin' ;
155
154
} else if ( / ^ o n b l u r $ / i. test ( i ) ) {
156
155
i = 'onfocusout' ;
157
- } else if ( / ^ o n ( A n i | T r a | T o u | B e f o r e I n p ) / . test ( i ) ) {
156
+ } else if ( / ^ o n ( A n i | T r a | T o u | B e f o r e I n p | C o m p o ) / . test ( i ) ) {
158
157
i = i . toLowerCase ( ) ;
159
158
} else if ( nonCustomElement && CAMEL_PROPS . test ( i ) ) {
160
159
i = i . replace ( / [ A - Z 0 - 9 ] / , '-$&' ) . toLowerCase ( ) ;
Original file line number Diff line number Diff line change @@ -275,4 +275,11 @@ describe('preact/compat events', () => {
275
275
scratch . firstChild . dispatchEvent ( createEvent ( 'beforeinput' ) ) ;
276
276
expect ( spy ) . to . be . calledOnce ;
277
277
} ) ;
278
+
279
+ it ( 'should normalize compositionstart event listener' , ( ) => {
280
+ let spy = sinon . spy ( ) ;
281
+ render ( < input onCompositionStart = { spy } /> , scratch ) ;
282
+ scratch . firstChild . dispatchEvent ( createEvent ( 'compositionstart' ) ) ;
283
+ expect ( spy ) . to . be . calledOnce ;
284
+ } ) ;
278
285
} ) ;
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ export function cloneElement<P>(
248
248
// -----------------------------------
249
249
250
250
// TODO: Revisit what the public type of this is...
251
- export const Fragment : ComponentClass < { } , { } > ;
251
+ export const Fragment : FunctionComponent < { } > ;
252
252
253
253
//
254
254
// Preact options
You can’t perform that action at this time.
0 commit comments