From 83133c70cc9443183ffefa9d172e4a8e12880cfd Mon Sep 17 00:00:00 2001 From: Daniel Poggenpohl Date: Mon, 8 Sep 2025 17:15:43 +0200 Subject: [PATCH] #156 - Fix for console error + non-loaded comment editor using touchbased devices in pin mode --- shared/index.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/shared/index.js b/shared/index.js index 9a84f65..5f9b8f8 100644 --- a/shared/index.js +++ b/shared/index.js @@ -8135,21 +8135,25 @@ function startIndex( documentId = _getMetadata.documentId; pageNumber = _getMetadata.pageNumber; deleteUndefinedPin(); - var coordinates = { - x: e.changedTouches[0].clientX, - y: e.changedTouches[0].clientY, - }; - renderPinTouchscreen(coordinates); - [textarea, data] = (0, _commentWrapper.openCommentTouchscreen)( - e, - handleCancelClick, - handleSubmitClick, - handleToolbarClick, - handleSubmitBlur, - 'pin' - ); + var fn = () => { + [textarea, data] = (0, _commentWrapper.openCommentTouchscreen)( + e, + handleCancelClick, + handleSubmitClick, + handleToolbarClick, + handleSubmitBlur, + 'pin' + ); + var coordinates = { + x: e.changedTouches[0].clientX, + y: e.changedTouches[0].clientY, + }; + renderPinTouchscreen(coordinates); + } + _commentWrapper.loadEditor('add', 0, fn); } + /** * If the toolbar is clicked, the point tool should be disabled and the commentswrapper should be closed * @param {type} e @@ -10846,4 +10850,4 @@ function extract_text_from_html(html) { function get_post_content(commentList) { var commentInsidePtag = commentList.querySelectorAll(''); -} \ No newline at end of file +}