File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/jupyterlab-lsp/src/components Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,18 @@ export class FreeTooltip extends Tooltip {
138
138
const style = window . getComputedStyle ( this . node ) ;
139
139
const paddingLeft = parseInt ( style . paddingLeft ! , 10 ) || 0 ;
140
140
141
+ // When the editor is attached to the main area, contain the hover box
142
+ // to the full area available (rather than to the editor itself); the available
143
+ // area excludes the toolbar, hence the first Widget child between MainAreaWidget
144
+ // and editor is preferred.
145
+ const host =
146
+ ( editor . host . closest ( '.jp-MainAreaWidget > .lm-Widget' ) as HTMLElement ) ||
147
+ editor . host ;
148
+
141
149
// Calculate the geometry of the tooltip.
142
150
HoverBox . setGeometry ( {
143
151
anchor,
144
- host : editor . host ,
152
+ host : host ,
145
153
maxHeight : MAX_HEIGHT ,
146
154
minHeight : MIN_HEIGHT ,
147
155
node : this . node ,
You can’t perform that action at this time.
0 commit comments