Skip to content

JS Editing: Editor jumping up and down typing (after a short pause in typing) - seems related to the collapse imports at the top of the file. #1508

Closed

Description

@jridge-ezclocker

The JS editor will collapse imports when opened. With imports collapsed, I begin editing some of the JS code and after pausing typing the editor jumps up/down (which appears to be the expanding/collapsing imports refreshing for some reason) and causes the editor to scroll into the wrong position. Even when just typing a space - this happens. It makes editing JS files in eclipse impossible - so I'm using a different IDE now (VSCode).

The collapsing of imports seems very bugged and might be the root of the problem. The imports never stay 'un-folded' and 'un-folding' them tends to never work property without typing a space at the end of a import line (see some example screen shots below). This code folding issue might well need to be written up as a different issue - just let me know.

Imports Collapsed
collapse-imports

After Click + on the Collapsed Import Line you can see they do not fully expand and clicking fold/unfold doesn't correct the problem:
failed-expanded-imports

In order to see imports, I have to type a space at the end of one of the visible lines. Then they will mostly appear, although sometimes they immediately collapse again. Always collapsing after typing or copying in a new import (even when I haven't finished typing it in). Very frustrating.

As a side point: I do not want the imports folded to begin with but do not see anything that will disable the functionality (please guide me if there is somewhere I can disable that).

I do have other plugins installed - I removed one (AnyEdit) that I suspected might be causing an issue but it had not effect on the problem after removing (still existed). I can provide the plugins listed in case you need to review or ask me to remove one and check the results. In general it Spring Tools, DevStyle, AspectJ Tools, SonarLint, and JAutoDoc.

Activity

  1. angelozerr commented on Apr 2, 2024

    @angelozerr
    Contributor

    I remember that I had this problem when I have implemented CodeMining.

    Perhaps I'm wrong, but I suspect that it is a problem with Eclipse Platform Text which doesn't compute correctly the top position of the editor.

  2. ultraswank commented on Apr 2, 2024

    @ultraswank

    Came here to report the same thing. None of the Eclipse Editor options to disable folding seem to have any impact. Neither does disabling CodeMining.

  3. jridge-ezclocker commented on Apr 3, 2024

    @jridge-ezclocker
    Author

    I remember that I had this problem when I have implemented CodeMining.

    Perhaps I'm wrong, but I suspect that it is a problem with Eclipse Platform Text which doesn't compute correctly the top position of the editor.

    I think it is possible the problem is in the Generic text editor and not specific to WildWebDeveloper. Should I report the same defect in https://github.com/eclipse-platform/eclipse.platform.ui or is there a way to @ that team to this defect?

    I see this (related to folded code) reported: eclipse-platform/eclipse.platform.ui#1182 - reading that report it does seem to act like what I see with the imports at the top of a JS file. I'll add a reference to this bug report in the one I linked just in case.

  4. mickaelistria commented on Apr 4, 2024

    @mickaelistria
    Contributor

    I think it is possible the problem is in the Generic text editor and not specific to WildWebDeveloper. Should I report the same defect in https://github.com/eclipse-platform/eclipse.platform.ui or is there a way to @ that team to this defect?

    If you can reproduce it for the generic editor in general and provide a test case that reproduces it without requiring anything else than the generic editor, then a report to eclipse.platform.ui is really welcome.
    However, if you cannot reproduce it with plain generic editor nor provide a self-contained test case to report it, then it's probably not worth reporting.
    Note that I've extensively used generic editor with JDT-LS, and couldn't see this problem although JDT-LS provide folding ranges, so it doesn't seem obvious that it's a generic editor problem to me.

  5. Kiiv commented on Apr 4, 2024

    @Kiiv

    Same problem here. Can't tell if its new or if it's related to latest Eclipse version because I'm juste starting to work on TypeScript files.

    Unfortunately I can't test the latest snapshot because of a hash problem (#1505).

  6. wesleybl commented on May 6, 2024

    @wesleybl

    As said here: eclipse-lsp4e/lsp4e#895 (comment)

    To disable import collapses, simply install the latest version of lsp4e.

  7. akurtakov commented on Dec 13, 2024

    @akurtakov
    Contributor

    Is this still a problem for you/

  8. wesleybl commented on Dec 13, 2024

    @wesleybl

    @akurtakov It is necessary to verify that wildwebdeveloper is using the latest version of lsp4e. This way, import collapses is disabled.

  9. jridge-ezclocker commented on Jun 25, 2025

    @jridge-ezclocker
    Author

    Late reply, but I haven't seen this problem in the last view releases. Closing.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions