mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 10:43:02 +03:00
Fix Numeric Input cooperation with Drop Down (#11091)
Fixes #11063
The blur on Numeric Input was removed in https://github.com/enso-org/enso/pull/10337 and then reintroduced in https://github.com/enso-org/enso/pull/10512. I guess it was to handle `tab` properly, so I added another way of handling `tab` and removed blur again (with explanation).
(cherry picked from commit 53e101566a
)
This commit is contained in:
parent
d337bc2b9f
commit
729ea72591
@ -75,6 +75,12 @@ export const widgetDefinition = defineWidget(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- Do not finish edit on blur here!
|
||||
|
||||
It is tempting, but it breaks the cooperation with possible drop-down widget. Blur may be done on
|
||||
pointerdown, and if it would end the interaction, the drop down would also be hidden, making
|
||||
any `click` event on it impossible.
|
||||
-->
|
||||
<NumericInputWidget
|
||||
ref="inputComponent"
|
||||
class="WidgetNumber"
|
||||
@ -84,7 +90,8 @@ export const widgetDefinition = defineWidget(
|
||||
@update:modelValue="setValue"
|
||||
@click.stop
|
||||
@focus="editHandler.start()"
|
||||
@blur="editHandler.end()"
|
||||
@keydown.enter.stop="editHandler.end()"
|
||||
@keydown.tab.stop="editHandler.end()"
|
||||
@input="editHandler.edit($event)"
|
||||
/>
|
||||
</template>
|
||||
|
@ -98,6 +98,12 @@ export const widgetDefinition = defineWidget(
|
||||
<template>
|
||||
<label ref="widgetRoot" class="WidgetText widgetRounded">
|
||||
<NodeWidget v-if="shownLiteral.open" :input="WidgetInput.FromAst(shownLiteral.open)" />
|
||||
<!-- Do not finish edit on blur here!
|
||||
|
||||
It is tempting, but it breaks the cooperation with possible drop-down widget. Blur may be done on
|
||||
pointerdown, and if it would end the interaction, the drop down would also be hidden, making
|
||||
any `click` event on it impossible.
|
||||
-->
|
||||
<AutoSizedInput
|
||||
ref="input"
|
||||
v-model="editedContents"
|
||||
|
Loading…
Reference in New Issue
Block a user