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 {
261261
262262 docPanel . setAttribute ( 'style' , '' ) ;
263263 } else {
264- docPanel . setAttribute ( 'style' , 'none' ) ;
264+ docPanel . setAttribute ( 'style' , 'display: none' ) ;
265265 }
266266 }
267267
268- set_doc_panel_placeholder ( enabled : boolean ) {
268+ set_doc_panel_placeholder ( enable : boolean ) {
269269 let completer = this . current_completion_handler . completer ;
270270 const docPanel = completer . node . querySelector ( DOC_PANEL_SELECTOR ) ;
271- if ( enabled ) {
271+ if ( enable ) {
272272 docPanel . setAttribute ( 'style' , '' ) ;
273273 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' ) ;
276276 docPanel . classList . remove ( DOC_PANEL_PLACEHOLDER_CLASS ) ;
277277 }
278278 }
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ export class LazyCompletionItem implements CompletionHandler.ICompletionItem {
130130 connection
131131 . getCompletionResolve ( this . match )
132132 . then ( resolvedCompletionItem => {
133+ this . connector . lab_integration . set_doc_panel_placeholder ( false ) ;
133134 if ( resolvedCompletionItem === null ) {
134135 return ;
135136 }
136137 this . _setDocumentation ( resolvedCompletionItem . documentation ) ;
137138 this . _resolved = true ;
138- this . connector . lab_integration . set_doc_panel_placeholder ( false ) ;
139139 this . connector . lab_integration . refresh_doc_panel ( this ) ;
140140 } )
141141 . catch ( e => {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class LSPCompletionRenderer
6666 . catch ( this . options . console . warn ) ;
6767 return this . options . markdownRenderer . node ;
6868 } else {
69- let node = new HTMLDivElement ( ) ;
69+ let node = document . createElement ( 'div' ) ;
7070 node . textContent = item . documentation ;
7171 return node ;
7272 }
You can’t perform that action at this time.
0 commit comments