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 {
309
309
// move box above the current editing line
310
310
// HACK: patch the decoration's style so it is shown above the current line
311
311
setTimeout ( ( ) => {
312
+ const overlay = view . element . parentElement
313
+ if ( ! overlay ) {
314
+ return
315
+ }
312
316
const hight = view . element . getBoundingClientRect ( ) . height
313
317
const lineHight = editor . getLineHeightInPixels ( )
314
318
const availableHight = ( position . row - editor . getFirstVisibleScreenRow ( ) ) * lineHight
315
319
if ( hight < availableHight + 80 ) {
316
- view . element . style . bottom = lineHight + hight + "px"
320
+ overlay . style . transform = `translateY(- ${ lineHight + hight } px)`
317
321
} else {
318
322
// move right so it does not overlap with auto-complete-list
319
323
const autoCompleteList = editor . getElement ( ) . querySelector ( "autocomplete-suggestion-list" )
320
324
if ( autoCompleteList ) {
321
- view . element . style . left = autoCompleteList . clientWidth + "px"
325
+ overlay . style . transform = `translateX( ${ autoCompleteList . clientWidth } px)`
322
326
} else {
323
- view . element . style . left = "300px"
327
+ overlay . style . transform = "translateX( 300px) "
324
328
}
325
329
}
326
330
view . element . style . visibility = "visible"
You can’t perform that action at this time.
0 commit comments