File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
packages/electron-chrome-extensions/src/browser Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,28 @@ export class PopupView {
202202 if ( ! this . browserWindow || ! this . parent ) return
203203
204204 const winBounds = this . parent . getBounds ( )
205+ const winContentBounds = this . parent . getContentBounds ( )
206+ const nativeTitlebarHeight = winBounds . height - winContentBounds . height
207+
205208 const viewBounds = this . browserWindow . getBounds ( )
206209
207210 let x = winBounds . x + this . anchorRect . x + this . anchorRect . width - viewBounds . width
208- let y = winBounds . y + this . anchorRect . y + this . anchorRect . height + PopupView . POSITION_PADDING
211+ let y =
212+ winBounds . y +
213+ nativeTitlebarHeight +
214+ this . anchorRect . y +
215+ this . anchorRect . height +
216+ PopupView . POSITION_PADDING
209217
210218 // If aligned to a differently then we need to offset the popup position
211219 if ( this . alignment ?. includes ( 'right' ) ) x = winBounds . x + this . anchorRect . x
212220 if ( this . alignment ?. includes ( 'top' ) )
213- y = winBounds . y - viewBounds . height + this . anchorRect . y - PopupView . POSITION_PADDING
221+ y =
222+ winBounds . y +
223+ nativeTitlebarHeight -
224+ viewBounds . height +
225+ this . anchorRect . y -
226+ PopupView . POSITION_PADDING
214227
215228 // Convert to ints
216229 x = Math . floor ( x )
You can’t perform that action at this time.
0 commit comments