This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 2121 <wizard-step :tab =" tab"
2222 :step-size =" stepSize"
2323 @click.native =" navigateToTab(index)"
24- @keyup.enter.native =" navigateOrGoToNext (index)"
24+ @keyup.enter.native =" navigateToTab (index)"
2525 :transition =" transition"
2626 :index =" index" >
2727 </wizard-step >
213213 },
214214 addTab (item ) {
215215 const index = this .$slots .default .indexOf (item .$vnode )
216- item .tabId = ` t-${ item .title }${ index} `
216+ item .tabId = ` t-${ item .title . replace ( / / g , ' ' ) }${ index} `
217217 this .tabs .splice (index, 0 , item)
218218 // if a step is added before the current one, go to it
219219 if (index < this .activeTabIndex + 1 ) {
259259 }
260260 return index <= this .maxStep
261261 },
262- navigateOrGoToNext (index ) {
263- if (! this .navigateToTab (index)) {
264- for (let i = this .activeTabIndex ; i < index; i++ ) {
265- this .nextTab ()
266- }
267- }
268- },
269262 nextTab () {
270263 let cb = () => {
271264 if (this .activeTabIndex < this .tabCount - 1 ) {
292285 focusNextTab () {
293286 let tabIndex = getFocusedTabIndex (this .tabs )
294287 if (tabIndex !== - 1 && tabIndex < this .tabs .length - 1 ) {
295- let toFocusId = this .tabs [tabIndex + 1 ].tabId
296- findElementAndFocus (toFocusId)
288+ let tabToFocus = this .tabs [tabIndex + 1 ]
289+ if (tabToFocus .checked ) {
290+ findElementAndFocus (tabToFocus .tabId )
291+ }
297292 }
298293 },
299294 focusPrevTab () {
Original file line number Diff line number Diff line change 44 <a >
55 <div class =" wizard-icon-circle md"
66 role =" tab"
7- tabindex =" 0 "
7+ : tabindex =" tab.checked ? 0 : -1 "
88 :id =" tab.tabId"
99 :aria-controls =" tab.title"
1010 :aria-disabled =" tab.active"
You can’t perform that action at this time.
0 commit comments