New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Panel] Blueprint autofocus property not working as expected #3083
Comments
A |
See related issue #3084 |
@foxacid Actually I think your use is not correct. Instead of test:
label: Test
type: structure
fields:
date:
label: Date
type: date
name:
label: Name
type: text
autofocus: true # used here instead on date field
text:
label: Text
type: text |
Also |
Thanks, but did you test that? It doesn't work for me, unfortunately... Also no luck with 3.5.1-rc.1 |
@foxacid Did you delete the Could you share full blueprint setup if still doesn't working? |
Weird. I upgraded via composer and just deleted the media folder. No change.
Here's my full blueprint snippet with the 'honeypot' commented out and a
|
@foxacid Here screencast with your blueprint on 3.5.1-RC1 (Windows 10, Firefox/Chrome) |
Ah! I can confirm that it works when the fields are empty. Store some values and try again, please 😉 |
Still working for me. You've not selected the
|
Thanks for hanging in there! Here's my video reply: k3_autofocus.mov |
@foxacid Thank you for testing it patiently 👍 I can see it now 😅 I hope will be fixed 3.5.1 stable version at next week. |
@afbora cool. I still believe that an implementation of |
The |
…tructure-fields Fixes autofocus fields in structure fields #3083
✅ |
I'm still having the same behavior on 3.5.6 and have to add a gap field 😢 |
@kaliel86 Could you post your structure blueprint to test please? |
Of course, here it is.
|
@kaliel86 I can't reproduce the issue when i click to add button in 3.5.6. If you click to date in row to edit, this is intended behavior. |
Did you tried with gap field removed ? |
Yes, you right. My mistake. Could you create new issue for this please? |
The video shows a structure field containing a date field as first child. When clicking on an existing entry, the date field pops up and can only be closed by confirming the date. Clicking elsewhere on the structure does nothing and clicking outside of the structure closes the parent as well.
Setting
autofocus: false
on either date field or its parent structure field does not seem to have any effect. Autofocus also occurs when using the arrow buttons to navigate between structure entries.k3_structure-date-field-autofocus.mov
Simplified Blueprint
Expected behavior
I'd expect
autofocus: false
to prevent focus when:Additionally I'd expect the date field to close when clicking anywhere but the date field (just like a HTML select box), but this should probably be a separate issue report...
Workarounds
The only workaround I found was to add a honeypot
line
field to intercept the focus (ahidden
field doesn't work, unfortunately).Kirby Version
3.5
Desktop
Mac OS 10.14.6, Firefox 84.0.2
The text was updated successfully, but these errors were encountered: