LearnNewsExamplesServices
Frontmatter
id4799
titleform.field.Select: editable false & focusLeave is not hiding the picker
stateClosed
labels
bughelp wanted
assignees[]
createdAtAug 30, 2023, 11:38 AM
updatedAtDec 5, 2023, 1:14 PM
githubUrlhttps://github.com/neomjs/neo/issues/4799
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 5, 2023, 1:14 PM

form.field.Select: editable false & focusLeave is not hiding the picker

Closed v8.1.0 bughelp wanted
tobiu
tobiu commented on Aug 30, 2023, 11:38 AM

this one is tricky: in case editable: true, we can open the picker by clicking on the related trigger. once we click somewhere else, the picker will get hidden onFocusLeave().

however, when using editable: false, the picker will also show in case we click on the input node. This node has the CSS rules

pointer-events: none;
user-select: none;

i think this one is confusing manager.Focus, since the field is not receiving it on a click => focussing something else does not trigger onFocusLeave() => the picker won't hide.

my first idea was that clicking on the input node could pass the focus to the picker trigger. however in that case, clicking on the input node again can trigger a focus leave.

we need a clean concept, how to best solve this issue.

@mxmrtns @ExtAnimal @Dinkh @dztoprak @hergerger1971

tobiu added the bug label on Aug 30, 2023, 11:38 AM
tobiu added the help wanted label on Aug 30, 2023, 11:38 AM
tobiu
tobiu Aug 30, 2023, 11:42 AM

we can reproduce the issue here: https://neomjs.github.io/pages/node_modules/neo.mjs/dist/production/examples/form/field/select/index.html

=> uncheck the editable CheckBox on the right side. Click on the input node of the SelectField, click somewhere else (e.g. focus a different field).

stokedowl referenced in commit 2a6dd4d - "Fix picker not hiding on onFocusLeave with editable: false in form.field.Select (#4799)" on Oct 4, 2023, 1:44 PM
stokedowl cross-referenced by PR #4971 on Oct 4, 2023, 1:57 PM
tobiu
tobiu Dec 5, 2023, 1:14 PM

should be resolved by @ExtAnimal

tobiu closed this issue on Dec 5, 2023, 1:14 PM