Opened 10 years ago
Closed 10 years ago
#36018 closed defect (bug) (fixed)
Ensure autofocus for dynamically-created panels, sections, and controls
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.5 | Priority: | normal |
| Severity: | normal | Version: | 4.1 |
| Component: | Customize | Keywords: | has-patch commit |
| Focuses: | javascript | Cc: |
Description
At the moment, autofocus via URL params (#28650) only works for panels, sections, and controls which are defined statically up-front. Any constructs not created statically will be stripped from exporting to JS. Additionally, from the JS side, if any of these constructs do not exist by ready, they will also be ignored.
Autofocus should work for anything that gets created with JS.
Attachments (3)
Change History (6)
Note: See
TracTickets for help on using
tickets.
See 36018.0.diff.
The PHP logic for calculating
$can_autofocusis being over zealous in its checks. If the panel, section, or control doesn't exist on the JS side (due to not existing or due to a capability failure), there will not be anything to focus on.