@@ -449,7 +449,6 @@ class ContentHoverData {
449
449
const HORIZONTAL_SCROLLING_BY = 30 ;
450
450
const SCROLLBAR_WIDTH = 10 ;
451
451
const SASH_WIDTH_MINUS_BORDER = 3 ;
452
- const BORDER_WIDTH = 1 ;
453
452
454
453
export class ResizableHoverWidget extends MultiplePersistedSizeResizableContentWidget {
455
454
@@ -775,19 +774,19 @@ export class ResizableHoverWidget extends MultiplePersistedSizeResizableContentW
775
774
private _setPersistedHoverDimensionsOrRenderNormally ( ) : void {
776
775
const persistedSize = this . findPersistedSize ( ) ;
777
776
// Suppose a persisted size is defined
777
+ let width : number | string ;
778
+ let height : number | string ;
778
779
if ( persistedSize ) {
779
- const width = Math . min ( this . _findAvailableSpaceHorizontally ( ) ?? Infinity , persistedSize . width - 2 * SASH_WIDTH_MINUS_BORDER ) ;
780
- const height = Math . min ( this . _findAvailableSpaceVertically ( ) ?? Infinity , persistedSize . height - 2 * SASH_WIDTH_MINUS_BORDER ) ;
781
- this . _setHoverWidgetDimensions ( width , height ) ;
780
+ width = Math . min ( this . _findAvailableSpaceHorizontally ( ) ?? Infinity , persistedSize . width - 2 * SASH_WIDTH_MINUS_BORDER ) ;
781
+ height = Math . min ( this . _findAvailableSpaceVertically ( ) ?? Infinity , persistedSize . height - 2 * SASH_WIDTH_MINUS_BORDER ) ;
782
782
} else {
783
783
// Added because otherwise the initial size of the hover content is smaller than should be
784
784
const layoutInfo = this . _editor . getLayoutInfo ( ) ;
785
785
this . _resizableNode . layout ( layoutInfo . height , layoutInfo . width ) ;
786
- this . _setHoverWidgetDimensions ( 'auto' , 'auto' ) ;
787
- // Added otherwise rendered too small horizontally
788
- const containerDomNode = this . _hoverWidget . containerDomNode ;
789
- this . _setContainerDomNodeDimensions ( containerDomNode . clientWidth + 2 * BORDER_WIDTH , containerDomNode . clientHeight ) ;
786
+ width = 'auto' ;
787
+ height = 'auto' ;
790
788
}
789
+ this . _setHoverWidgetDimensions ( width , height ) ;
791
790
}
792
791
793
792
private _setContainerAbsolutePosition ( top : number , left : number ) : void {
0 commit comments