File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
packages/jupyterlab-lsp/src/features/completion Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -261,18 +261,18 @@ export class CompletionLabIntegration implements IFeatureLabIntegration {
261
261
262
262
docPanel . setAttribute ( 'style' , '' ) ;
263
263
} else {
264
- docPanel . setAttribute ( 'style' , 'none' ) ;
264
+ docPanel . setAttribute ( 'style' , 'display: none' ) ;
265
265
}
266
266
}
267
267
268
- set_doc_panel_placeholder ( enabled : boolean ) {
268
+ set_doc_panel_placeholder ( enable : boolean ) {
269
269
let completer = this . current_completion_handler . completer ;
270
270
const docPanel = completer . node . querySelector ( DOC_PANEL_SELECTOR ) ;
271
- if ( enabled ) {
271
+ if ( enable ) {
272
272
docPanel . setAttribute ( 'style' , '' ) ;
273
273
docPanel . classList . add ( DOC_PANEL_PLACEHOLDER_CLASS ) ;
274
- } else {
275
- docPanel . setAttribute ( 'style' , 'none' ) ;
274
+ } else if ( docPanel . classList . contains ( DOC_PANEL_PLACEHOLDER_CLASS ) ) {
275
+ docPanel . setAttribute ( 'style' , 'display: none' ) ;
276
276
docPanel . classList . remove ( DOC_PANEL_PLACEHOLDER_CLASS ) ;
277
277
}
278
278
}
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ export class LazyCompletionItem implements CompletionHandler.ICompletionItem {
130
130
connection
131
131
. getCompletionResolve ( this . match )
132
132
. then ( resolvedCompletionItem => {
133
+ this . connector . lab_integration . set_doc_panel_placeholder ( false ) ;
133
134
if ( resolvedCompletionItem === null ) {
134
135
return ;
135
136
}
136
137
this . _setDocumentation ( resolvedCompletionItem . documentation ) ;
137
138
this . _resolved = true ;
138
- this . connector . lab_integration . set_doc_panel_placeholder ( false ) ;
139
139
this . connector . lab_integration . refresh_doc_panel ( this ) ;
140
140
} )
141
141
. catch ( e => {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class LSPCompletionRenderer
66
66
. catch ( this . options . console . warn ) ;
67
67
return this . options . markdownRenderer . node ;
68
68
} else {
69
- let node = new HTMLDivElement ( ) ;
69
+ let node = document . createElement ( 'div' ) ;
70
70
node . textContent = item . documentation ;
71
71
return node ;
72
72
}
You can’t perform that action at this time.
0 commit comments