Skip to content

Commit 0f8cfe1

Browse files
authored
Fix spacebar bug in text widgets (#13513)
1 parent d127c70 commit 0f8cfe1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/gui/integration-test/project-view/widgets.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ test('Selection widget with text widget as input', async ({ page }) => {
373373
// Editing text input shows and filters drop down
374374
await pathArgInput.click()
375375
await pathDropdown.expectVisibleWithOptions([...CHOOSE_FILE_OPTIONS, 'File 1', 'File 2'])
376-
await page.keyboard.insertText('File 1')
376+
// Using `type` instead of `inputText` here to catch keydown bugs like #13505.
377+
await page.keyboard.type('File 1')
377378
await pathDropdown.expectVisibleWithOptions(['File 1'])
378379
// Clearing input should show all text literal options
379380
await pathArgInput.clear()

app/gui/src/project-view/components/GraphEditor/widgets/WidgetSelection.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,9 @@ declare module '@/providers/widgetRegistry' {
265265
</script>
266266

267267
<template>
268-
<button
268+
<div
269269
ref="widgetRoot"
270270
class="WidgetSelection clickable"
271-
:tabindex="-1"
272271
@pointerdown.prevent
273272
@click.stop="toggleDropdownWidget"
274273
@keydown.enter.stop
@@ -300,7 +299,7 @@ declare module '@/providers/widgetRegistry' {
300299
</div>
301300
</Teleport>
302301
</OptionallyKeepAlive>
303-
</button>
302+
</div>
304303
</template>
305304

306305
<style scoped>

0 commit comments

Comments
 (0)