@sveltia/ui 0.10.0 → 0.10.1
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.
- package/package/services/group.js +30 -3
- package/package.json +1 -1
|
@@ -96,7 +96,17 @@ class Group {
|
|
|
96
96
|
controlTarget.setAttribute('aria-hidden', String(!isSelected));
|
|
97
97
|
|
|
98
98
|
if (isSelected) {
|
|
99
|
-
|
|
99
|
+
window.setTimeout(() => {
|
|
100
|
+
try {
|
|
101
|
+
controlTarget.scrollIntoView({
|
|
102
|
+
block: 'nearest',
|
|
103
|
+
inline: 'nearest',
|
|
104
|
+
behavior: 'auto',
|
|
105
|
+
});
|
|
106
|
+
} catch {
|
|
107
|
+
controlTarget.scrollIntoView(true);
|
|
108
|
+
}
|
|
109
|
+
}, 300);
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
});
|
|
@@ -245,13 +255,30 @@ class Group {
|
|
|
245
255
|
controlTarget.setAttribute('aria-hidden', String(!isTarget));
|
|
246
256
|
|
|
247
257
|
if (isTarget) {
|
|
248
|
-
|
|
258
|
+
window.setTimeout(() => {
|
|
259
|
+
try {
|
|
260
|
+
controlTarget.scrollIntoView({
|
|
261
|
+
block: 'nearest',
|
|
262
|
+
inline: 'nearest',
|
|
263
|
+
behavior: 'auto',
|
|
264
|
+
});
|
|
265
|
+
} catch {
|
|
266
|
+
controlTarget.scrollIntoView(true);
|
|
267
|
+
}
|
|
268
|
+
}, 300);
|
|
249
269
|
}
|
|
250
270
|
}
|
|
251
271
|
|
|
252
272
|
if (isTarget) {
|
|
253
273
|
this.parent.setAttribute('aria-activedescendant', element.id);
|
|
254
|
-
|
|
274
|
+
|
|
275
|
+
window.setTimeout(() => {
|
|
276
|
+
try {
|
|
277
|
+
element.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'auto' });
|
|
278
|
+
} catch {
|
|
279
|
+
element.scrollIntoView(true);
|
|
280
|
+
}
|
|
281
|
+
}, 300);
|
|
255
282
|
}
|
|
256
283
|
});
|
|
257
284
|
|