File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,10 @@ export function tooltips(config: {
103
103
parent ?: HTMLElement
104
104
/// By default, when figuring out whether there is room for a
105
105
/// tooltip at a given position, the extension considers the entire
106
- /// space between 0,0 and `innerWidth`,`innerHeight` to be available
107
- /// for showing tooltips. You can provide a function here that
108
- /// returns an alternative rectangle.
106
+ /// space between 0,0 and
107
+ /// `documentElement.clientWidth`/`clientHeight` to be available for
108
+ /// showing tooltips. You can provide a function here that returns
109
+ /// an alternative rectangle.
109
110
tooltipSpace ?: ( view : EditorView ) => Rect
110
111
} = { } ) : Extension {
111
112
return tooltipConfig . of ( config )
@@ -118,8 +119,8 @@ type TooltipConfig = {
118
119
}
119
120
120
121
function windowSpace ( view : EditorView ) {
121
- let { win } = view
122
- return { top : 0 , left : 0 , bottom : win . innerHeight , right : win . innerWidth }
122
+ let docElt = view . dom . ownerDocument . documentElement
123
+ return { top : 0 , left : 0 , bottom : docElt . clientHeight , right : docElt . clientWidth }
123
124
}
124
125
125
126
const tooltipConfig = Facet . define < Partial < TooltipConfig > , TooltipConfig > ( {
You can’t perform that action at this time.
0 commit comments