Sha256: 0d73199064feb069f4fafa33e606702ba5c431e01ec0fcb7167522c8c377503c
Contents?: true
Size: 633 Bytes
Versions: 31
Compression:
Stored size: 633 Bytes
Contents
/** * When switching tabs in i18n fields, autofocus on the input to save clicks #212 */ $(() => { // Event launched by foundation $("[data-tabs]").on("change.zf.tabs", (event) => { const $container = $(event.target).next(".tabs-content .tabs-panel.is-active"); // Detect quilljs editor inside the tabs-panel let $content = $container.find(".editor .ql-editor"); if ($content.length > 0) { $content.focus(); // Detect if inside the tabs-panel have an input } else { $content = $container.find("input:first"); if ($content.length > 0) { $content.focus(); } } }); });
Version data entries
31 entries across 31 versions & 1 rubygems