afbora / Kirby-Tabs-Field

The tab field type is designed specifically for use within the fields.
77 stars 11 forks source link

First field stays focused on other tab #8

Closed medienbaecker closed 8 years ago

medienbaecker commented 8 years ago

When reloading the panel, the last opened tab will reopen. Unfortunately the first field (title) will be focused. So you can edit the field by mistake. For example when using keyboard shortcuts.

To showcase it, I switched to the second tab, reloaded and typed "asdf": focused-title

medienbaecker commented 8 years ago

I just played around with the relevant lines of tabs.js and added two lines that focus the first input of the active tab: https://github.com/medienbaecker/Kirby-Tabs-Field/commit/a0ed17f6fad1b890863860eff3896cf65b42bf08

afbora commented 8 years ago

Thanks @medienbaecker