Sha256: cf40e2249f34fa3d87ee467677e91d6a3b484c6febb188687532f7435e04e063
Contents?: true
Size: 551 Bytes
Versions: 16
Compression:
Stored size: 551 Bytes
Contents
// = require_self /** * When switching tabs in i18n fields, autofocus on the input to save clicks * * Similar to: * decidim-admin/app/assets/javascripts/decidim/admin/tab_focus.js.es6 */ $(() => { // Event launched by foundation $("[data-tabs]").on("change.zf.tabs", (event) => { const $container = $(event.target).parent().next(".tabs-content"); const $panel = $(".tabs-panel.is-active", $container); const $content = $("input, textarea", $panel).first(); if ($content.length > 0) { $content.focus(); } }); });
Version data entries
16 entries across 16 versions & 1 rubygems