We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d87b9b commit 65a5597Copy full SHA for 65a5597
packages/jupyterlab-lsp/src/features/hover.ts
@@ -386,10 +386,13 @@ export class HoverCM extends CodeMirrorIntegration {
386
protected async _updateUnderlineAndTooltip(
387
event: MouseEvent
388
): Promise<boolean> {
389
- const target = event.target as HTMLElement;
+ const target = event.target;
390
391
// if over an empty space in a line (and not over a token) then not worth checking
392
- if (target.classList.contains('CodeMirror-line')) {
+ if (
393
+ target == null ||
394
+ (target as HTMLElement).classList.contains('CodeMirror-line')
395
+ ) {
396
this.remove_range_highlight();
397
return false;
398
}
0 commit comments