@volverjs/ui-vue 0.0.8-beta.1 → 0.0.8-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,7 +101,9 @@
101
101
  const onAfterExpand = () => {
102
102
  if (searchable.value) {
103
103
  if (inputSearchEl.value) {
104
- inputSearchEl.value.focus()
104
+ inputSearchEl.value.focus({
105
+ preventScroll: true,
106
+ })
105
107
  }
106
108
  }
107
109
  }
@@ -210,7 +210,9 @@
210
210
  floatingEl.value,
211
211
  )
212
212
  if (focusableElements.length > 0) {
213
- focusableElements[0].focus()
213
+ focusableElements[0].focus({
214
+ preventScroll: true,
215
+ })
214
216
  }
215
217
  })
216
218
  }
@@ -286,9 +288,13 @@
286
288
  document.activeElement as HTMLElement,
287
289
  )
288
290
  if (activeElementIndex < focusableElements.length - 1) {
289
- focusableElements[activeElementIndex + 1].focus()
291
+ focusableElements[activeElementIndex + 1].focus({
292
+ preventScroll: true,
293
+ })
290
294
  } else {
291
- focusableElements[0].focus()
295
+ focusableElements[0].focus({
296
+ preventScroll: true,
297
+ })
292
298
  }
293
299
  }
294
300
  })
@@ -306,9 +312,13 @@
306
312
  document.activeElement as HTMLElement,
307
313
  )
308
314
  if (activeElementIndex > 0) {
309
- focusableElements[activeElementIndex - 1].focus()
315
+ focusableElements[activeElementIndex - 1].focus({
316
+ preventScroll: true,
317
+ })
310
318
  } else {
311
- focusableElements[focusableElements.length - 1].focus()
319
+ focusableElements[focusableElements.length - 1].focus({
320
+ preventScroll: true,
321
+ })
312
322
  }
313
323
  }
314
324
  })
@@ -18,7 +18,9 @@ export async function defaultTest({ canvasElement, args }: PlayAttributes) {
18
18
  }
19
19
 
20
20
  // check if tooltip is visible after focus
21
- await parentElement.focus()
21
+ await parentElement.focus({
22
+ preventScroll: true,
23
+ })
22
24
  await sleep(1200)
23
25
  await expect(window.getComputedStyle(element)).toHaveProperty(
24
26
  'opacity',