Skip to content

With highlight.js, SpecialChars will disappear after creation (perhaps to do with SelectTokenCallbacks) #141

Open

Description

@WebCoder49

Using these special characters (all ASCII chars from 0000 to 007F), on Firefox 140:

�������� � ������������������ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~�

Out of the full-plugin demos here, only with highlight.js and not with Prism.js, selecting text in the <textarea> or pressing arrow keys (but not adding/deleting text which changes the value and causes a rehighlight) causes:

  • the special characters to disappear and stop taking up space in the highlighted element.
  • This is a vague description and the characters disappear at some other times, too, but with little pattern; sometimes some but not all of the characters disappear.
  • This may be to do with SelectTokenCallbacks, since inspecting the element shows code-input_select-token-callbacks_temporary-span elements in the highlighted element.
Screenshot

Activity

  1. added this to the v2.6.0 milestone on Jul 18, 2025
  2. WebCoder49 commented on Jul 18, 2025

    @WebCoder49
    OwnerAuthor

    I cannot reproduce it on the same browser with only the SpecialChars plugin.

  3. modified the milestones: v2.6.0, v3.0.0 on Jul 18, 2025
  4. WebCoder49 commented on Jul 18, 2025

    @WebCoder49
    OwnerAuthor

    This is part of #106.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:existing-pluginA bug/feature for an existing plugin in the plugins folder of code-input.bugSomething isn't workinghelp wantedExtra attention is neededpriority:medium

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions