diff --git a/src/assets/form-wizard/_buttons.scss b/src/assets/form-wizard/_buttons.scss index d15610f..e0d35f8 100644 --- a/src/assets/form-wizard/_buttons.scss +++ b/src/assets/form-wizard/_buttons.scss @@ -6,15 +6,9 @@ font-size: $font-size-base; font-weight: $font-weight-bold; padding: $padding-base-vertical $padding-base-horizontal; + min-width: 140px; &:hover, &:focus { outline: 0 !important; } } - -.vue-form-wizard { - .navbar .navbar-nav > li > a.wizard-btn.wizard-btn-wd, - .wizard-btn-wd { - min-width: 140px; - } -} diff --git a/src/components/FormWizard.vue b/src/components/FormWizard.vue index 2844191..d412c92 100644 --- a/src/components/FormWizard.vue +++ b/src/components/FormWizard.vue @@ -74,6 +74,7 @@ diff --git a/src/components/helpers.js b/src/components/helpers.js new file mode 100644 index 0000000..cea815b --- /dev/null +++ b/src/components/helpers.js @@ -0,0 +1,15 @@ +export function getFocusedElementId () { + return document.activeElement.id +} +export function getFocusedTabIndex (tabs = []) { + let activeId = getFocusedElementId() + let tabIndex = tabs.findIndex(tab => tab.tabId === activeId) + return tabIndex +} +export function findElementAndFocus (elemId) { + let elem = document.getElementById(elemId) + elem.focus() +} +export function isPromise (func) { + return func.then && typeof func.then === 'function' +}