From 37bde2c9499b4bca540954cf5a945f6b78cf11b1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 20 Aug 2019 18:23:21 +0530 Subject: [PATCH] ... --- src/pyj/editor.pyj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pyj/editor.pyj b/src/pyj/editor.pyj index 0e2d90fa67..d33c121472 100644 --- a/src/pyj/editor.pyj +++ b/src/pyj/editor.pyj @@ -119,7 +119,8 @@ def onclick(event): tn = e.tagName.toLowerCase() if e.tagName else '' href = e.getAttribute('href') e = e.parentNode - to_python.request_sync(tn, href, address) + if to_python.request_sync: + to_python.request_sync(tn, href, address) return False @from_python @@ -130,7 +131,8 @@ def go_to_anchor(anchor): if elem: elem.scrollIntoView() address = get_sourceline_address(elem) - to_python.request_sync('', '', address) + if to_python.request_sync: + to_python.request_sync('', '', address) @from_python def live_css(editor_name, sourceline, tags):