Problem Statement
In the new (Angular) Plugins → Exported Packages screen, the search field automatically moves focus to the editable package-list <textarea> shortly after the user types. Because focus silently leaves the search input, any subsequent keystrokes are entered into the package list instead of the search box — the user can unintentionally modify the exported-packages configuration without realizing it.
Impact: reported by a customer on dotEvergreen. Functionally low severity, but there is a data-integrity angle — the textarea is the live exported-packages config, and unnoticed edits can corrupt it (a malformed exported-packages list is a known cause of OSGi plugin-load failures).
Root cause (identified): in libs/portlets/dot-plugins/src/lib/dot-plugins-extra-packages/dot-plugins-extra-packages.component.ts, typing fires onSearchChange() → a 500ms debounce (SEARCH_DEBOUNCE_MS) → #scrollToMatch(0), which calls textarea.focus() before setSelectionRange() (~lines 184–195). The .focus() is needed for the explicit ▲/▼ next/prev navigation but should not run on the search-as-you-type path.
Browser & OS: Not yet confirmed with the customer. Reproduced in a Chromium-based Jest/jsdom component-test environment.
Steps to Reproduce
- Log into the dotCMS admin.
- Open Plugins (the new Angular portlet) and click Exported Packages.
- Click into the search field at the top of the dialog.
- Type a few characters that match text in the package list (e.g.
com).
- Pause briefly (~0.5s) after typing.
Actual: ~500ms after typing (the search debounce), focus jumps from the search input to the editable package-list textarea; further keystrokes edit the package list.
Expected: Focus stays in the search input; the match is scrolled into view/highlighted, but the caret remains in the search box.
Reproduced deterministically with a Spectator/Jest component test on portlets-dot-plugins-portlet: after typing and advancing the 500ms debounce with fakeAsync/tick, document.activeElement changes from the search <input> to the <textarea>; before the debounce fires it correctly remains in the input.
Acceptance Criteria
dotCMS Version
26.06.15-01
Current Release / dotEvergreen (Cloud). Search feature present since ~2026-04-14 (PR #35311; portlet migrated to Angular in PR #34957 / #34732). Not present in the legacy "Plugins Legacy" (Dojo) OSGi screen.
Severity
Low - Minor issue or cosmetic
Links
Problem Statement
In the new (Angular) Plugins → Exported Packages screen, the search field automatically moves focus to the editable package-list
<textarea>shortly after the user types. Because focus silently leaves the search input, any subsequent keystrokes are entered into the package list instead of the search box — the user can unintentionally modify the exported-packages configuration without realizing it.Impact: reported by a customer on dotEvergreen. Functionally low severity, but there is a data-integrity angle — the textarea is the live exported-packages config, and unnoticed edits can corrupt it (a malformed exported-packages list is a known cause of OSGi plugin-load failures).
Root cause (identified): in
libs/portlets/dot-plugins/src/lib/dot-plugins-extra-packages/dot-plugins-extra-packages.component.ts, typing firesonSearchChange()→ a 500ms debounce (SEARCH_DEBOUNCE_MS) →#scrollToMatch(0), which callstextarea.focus()beforesetSelectionRange()(~lines 184–195). The.focus()is needed for the explicit ▲/▼ next/prev navigation but should not run on the search-as-you-type path.Browser & OS: Not yet confirmed with the customer. Reproduced in a Chromium-based Jest/jsdom component-test environment.
Steps to Reproduce
com).Actual: ~500ms after typing (the search debounce), focus jumps from the search input to the editable package-list textarea; further keystrokes edit the package list.
Expected: Focus stays in the search input; the match is scrolled into view/highlighted, but the caret remains in the search box.
Reproduced deterministically with a Spectator/Jest component test on
portlets-dot-plugins-portlet: after typing and advancing the 500ms debounce withfakeAsync/tick,document.activeElementchanges from the search<input>to the<textarea>; before the debounce fires it correctly remains in the input.Acceptance Criteria
dotCMS Version
26.06.15-01
Current Release / dotEvergreen (Cloud). Search feature present since ~2026-04-14 (PR #35311; portlet migrated to Angular in PR #34957 / #34732). Not present in the legacy "Plugins Legacy" (Dojo) OSGi screen.
Severity
Low - Minor issue or cosmetic
Links