Skip to content

2.x Active class is not added for folder in media source if there are many folders in the source #15311

Open
@Ruslan-Aleev

Description

@Ruslan-Aleev

Bug report

Summary

In PR #15227, the folder was selected, the folder is highlighted in the list, by condition:

if (n.id == this.config.openTo) {
    n.select();
}

Before this PR folders were not highlighted in the list. Now it works as expected:

node-class-1

However, if the source has a lot of folders (in my case> = 82), then the folder will not be selected in the list. It happens very rarely (see migx TV).

node-class-2

And it's not clear why it works like this.
We need to understand that this affects only the visual display of the folder in the list, and does not affect the upload or anything else.

Step to reproduce

  • Create a large number of folders in the media source, for example, 100.
  • Set TV and save the resource.
  • Open the resource again and change TV - the folder will not be selected in the list.

Observed behavior

The folder will not be selected in the list.

Expected behavior

The folder must be selected in the list.

Related issue(s)/PR(s)

#15227

Environment

MODX 2.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue in the code or project, which should be addressed.type-frontendIssues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions