瀏覽代碼

Fix sync to code from PDF only view (#16909)

GitOrigin-RevId: 3a2847716263bffaee540a7c90e609be5f64aeb6
Alf Eaton 2 年之前
父節點
當前提交
45389b3db2
共有 1 個文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx

+ 6 - 0
services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx

@@ -105,6 +105,12 @@ export const EditorAndPdf: FC<{
         className="ide-react-panel"
       >
         {pdfIsOpen && <PdfPreview />}
+        {/* ensure that "sync to code" is available in PDF only layout */}
+        {pdfLayout === 'flat' && view === 'pdf' && (
+          <div className="synctex-controls" hidden>
+            <DefaultSynctexControl />
+          </div>
+        )}
       </Panel>
     </PanelGroup>
   )