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 {
202
202
if ( ! this . browserWindow || ! this . parent ) return
203
203
204
204
const winBounds = this . parent . getBounds ( )
205
+ const winContentBounds = this . parent . getContentBounds ( )
206
+ const nativeTitlebarHeight = winBounds . height - winContentBounds . height
207
+
205
208
const viewBounds = this . browserWindow . getBounds ( )
206
209
207
210
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
209
217
210
218
// If aligned to a differently then we need to offset the popup position
211
219
if ( this . alignment ?. includes ( 'right' ) ) x = winBounds . x + this . anchorRect . x
212
220
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
214
227
215
228
// Convert to ints
216
229
x = Math . floor ( x )
You can’t perform that action at this time.
0 commit comments