Flipper: Fix exception in popup menus

Summary: When JavaScript fiction meets native interop reality, things get weird. Apparently some coordinates must be integer values.

Reviewed By: mweststrate

Differential Revision: D19606677

fbshipit-source-id: 88a6e8c465e59078b070b56b37eee571274c494a
This commit is contained in:
Robin Giese
2020-01-28 15:36:30 -08:00
committed by Facebook Github Bot
parent 04b925259c
commit 9699691eb6

View File

@@ -164,8 +164,9 @@ export default class FilterToken extends PureComponent<Props> {
window: electron.remote.getCurrentWindow(),
// @ts-ignore: async is private API
async: true,
x: left,
y: bottom + 8,
// Note: Electron requires the x/y parameters to be integer values for marshalling
x: Math.round(left),
y: Math.round(bottom + 8),
});
}
};