File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -309,18 +309,22 @@ module.exports = class SignatureHelpManager {
309309 // move box above the current editing line
310310 // HACK: patch the decoration's style so it is shown above the current line
311311 setTimeout ( ( ) => {
312+ const overlay = view . element . parentElement
313+ if ( ! overlay ) {
314+ return
315+ }
312316 const hight = view . element . getBoundingClientRect ( ) . height
313317 const lineHight = editor . getLineHeightInPixels ( )
314318 const availableHight = ( position . row - editor . getFirstVisibleScreenRow ( ) ) * lineHight
315319 if ( hight < availableHight + 80 ) {
316- view . element . style . bottom = lineHight + hight + "px"
320+ overlay . style . transform = `translateY(- ${ lineHight + hight } px)`
317321 } else {
318322 // move right so it does not overlap with auto-complete-list
319323 const autoCompleteList = editor . getElement ( ) . querySelector ( "autocomplete-suggestion-list" )
320324 if ( autoCompleteList ) {
321- view . element . style . left = autoCompleteList . clientWidth + "px"
325+ overlay . style . transform = `translateX( ${ autoCompleteList . clientWidth } px)`
322326 } else {
323- view . element . style . left = "300px"
327+ overlay . style . transform = "translateX( 300px) "
324328 }
325329 }
326330 view . element . style . visibility = "visible"
You can’t perform that action at this time.
0 commit comments