Sha256: ba60f5a9d16bafa60b72ffc644981ef21ed659fa97a2aebf5001ac08796e22c2
Contents?: true
Size: 652 Bytes
Versions: 44
Compression:
Stored size: 652 Bytes
Contents
// = require_self /** * 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
44 entries across 44 versions & 1 rubygems