From 9699691eb68b23dba613e8c1cbc1b1a950115007 Mon Sep 17 00:00:00 2001 From: Robin Giese Date: Tue, 28 Jan 2020 15:36:30 -0800 Subject: [PATCH] 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 --- src/ui/components/searchable/FilterToken.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/components/searchable/FilterToken.tsx b/src/ui/components/searchable/FilterToken.tsx index 5a6fecec2..ceba5273b 100644 --- a/src/ui/components/searchable/FilterToken.tsx +++ b/src/ui/components/searchable/FilterToken.tsx @@ -164,8 +164,9 @@ export default class FilterToken extends PureComponent { 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), }); } };