fix: skip microtask in custom renderer `create_event`

pull/18058/head
paoloricciuti 5 months ago
parent 81bf921672
commit 5c0e54ecff

@ -96,9 +96,8 @@ export function create_event(event_name, dom, handler, options = {}) {
// defer the attachment till after it's been appended to the document. TODO: remove this once Chrome fixes // defer the attachment till after it's been appended to the document. TODO: remove this once Chrome fixes
// this bug. The same applies to wheel events and touch events. // this bug. The same applies to wheel events and touch events.
if ( if (
event_name.startsWith('pointer') || !is_custom_renderer &&
event_name.startsWith('touch') || (event_name.startsWith('pointer') || event_name.startsWith('touch') || event_name === 'wheel')
event_name === 'wheel'
) { ) {
queue_micro_task(() => { queue_micro_task(() => {
add_event_listener(dom, event_name, target_handler, options); add_event_listener(dom, event_name, target_handler, options);

Loading…
Cancel
Save