Skip to content

[v1.5.8] [Moodle 4.4.9/4.5.6] [PHP 8.1] Console error on mobile when using pin comment mode #156

@danowar2k

Description

@danowar2k

Moodle Version in use

  • Moodle 4.4.9
  • Moodle 4.5.6

** Plugin Version **

v1.5.8 (2025032500)

Describe the bug

When using a smartphone in a PDF annotator, and you are in pin mode and put a pin at a spot in the PDF, a console error appears. Sometimes the text editor for the comment appears and sometimes it doesn't. We can't yet discern when.
(It was very hard to scroll from the pin toolbar to the editor spot because there is not much space where you don't scroll the PDF or nothing at all, it seems).

The error:

Uncaught TypeError: Cannot set properties of null (setting 'placeholder')
    at openCommentTouchscreen (index.js?ver=00039:6878:38)
    at HTMLDocument.handleContentTouchend (index.js?ver=00039:5771:77)

To Reproduce
Steps to reproduce the behavior:

  1. Create a pdfannotator, settings don't matter
  2. Using a smartphone, open the pdfannotator
  3. Activate pin mode
  4. Touch a spot on the PDF to add a pin.
  5. The error appears when you "touch up" (lift the finger)

Expected behavior
No console error should be shown, and the comment editor should always show.

Screenshots
Image

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S21+
  • OS: Android 15
  • Browser: Android Chrome
  • Version: 140.0.7339.51

Metadata

Metadata

Assignees

No one assigned

    Labels

    NextReleasemarked issues will be fixed in next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions