From d3691473bc9846c1fe4a91229ffdca839107badd Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 23 Dec 2021 01:10:15 -0500 Subject: [PATCH] HTML tree: Fix Shift-Enter for opening PDFs in separate windows This also required React 17, which removed event pooling [1], which was breaking this even after the code change. https://forums.zotero.org/discussion/comment/396112/#Comment_396112 [1] https://reactjs.org/blog/2020/08/10/react-v17-rc.html#no-event-pooling --- chrome/content/zotero/components/virtualized-table.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index b8e1e0b12f..a149afc67f 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -574,6 +574,10 @@ class VirtualizedTable extends React.Component { return; } break; + + case "Enter": + this._activateNode(e); + return; } if (e.key == 'ContextMenu' || (e.key == 'F10' && e.shiftKey)) { @@ -613,10 +617,6 @@ class VirtualizedTable extends React.Component { } } break; - - case "Enter": - this._activateNode(e); - break; } }