File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ export default {
2424 ios,
2525 android : / A n d r o i d \b / . test ( nav . userAgent ) ,
2626 webkit,
27- safari,
2827 webkit_version : webkit ? + ( / \b A p p l e W e b K i t \/ ( \d + ) / . exec ( nav . userAgent ) || [ 0 , 0 ] ) [ 1 ] : 0 ,
28+ safari,
29+ safari_version : safari ? + ( / \b V e r s i o n \/ ( \d + ( \. \d + ) ? ) / . exec ( nav . userAgent ) || [ 0 , 0 ] ) [ 1 ] : 0 ,
2930 tabSize : doc . documentElement . style . tabSize != null ? "tab-size" : "-moz-tab-size"
3031}
Original file line number Diff line number Diff line change 1+ import browser from "./browser"
2+
13export function getSelection ( root : DocumentOrShadowRoot ) : Selection | null {
24 let target
35 // Browsers differ on whether shadow roots have a getSelection
@@ -254,6 +256,8 @@ export class DOMSelectionState implements SelectionRange {
254256}
255257
256258let preventScrollSupported : null | false | { preventScroll : boolean } = null
259+ // Safari 26 breaks preventScroll support
260+ if ( browser . safari && browser . safari_version >= 26 ) preventScrollSupported = false
257261// Feature-detects support for .focus({preventScroll: true}), and uses
258262// a fallback kludge when not supported.
259263export function focusPreventScroll ( dom : HTMLElement ) {
You can’t perform that action at this time.
0 commit comments