Skip to content

[Panel]: Expand/collapse action keyboard shortcuts do not work correctly #12744

@Martin-Rippel

Description

@Martin-Rippel

Bug Description

The expand/collapse functionality of the panel doesn’t follow the general action triggering and canceling behavior found in other components, like the button.

Some issues can be reproduced using the component’s Basic Sample:

  1. Expand/collapse the panel using the enter key:
    • Focus the panel header.
    • Press down and hold the enter key.
    • Actual:
      • Windows: The panel starts continuously expanding and collapsing as long as the user presses down the enter key.
      • macOS: The panel only expands/collapses once after releasing the enter key.
    • Expected: The panel expands/collapses once as soon as pressing down the enter key.
  2. Cancel expanding/collapsing the panel using the spacebar, shift, and esc keys:
    • Focus the panel header.
    • Press down and hold the spacebar.
    • Press the esc or shift key.
    • Release the spacebar.
    • Actual:
      • Windows: The panel expands/collapses as soon as pressing the esc or shift key.
      • macOS: The panel expands/collapses after releasing the spacebar.
    • Expected: The panel does not change its expanded/collapsed state.

Other issues can be reproduced using the component’s Custom Header sample:

  1. Expand/collapse the panel using the enter key:
    • Focus the icon button in the panel header.
    • Press down and hold the enter key.
    • Actual:
      • Windows: The panel starts continuously expanding and collapsing as long as the user presses down the enter key.
      • macOS: The panel only expands/collapses once after releasing the enter key.
    • Expected: The panel expands/collapses as soon as pressing down the enter key.
  2. Cancel expanding/collapsing the panel using the spacebar, shift, and esc keys:
    • Focus the icon button in the panel header.
    • Press down and hold the spacebar.
    • Press the esc or shift key.
    • Release the spacebar.
    • Actual: The panel expands/collapses.
      • Windows: The panel expands/collapses as soon as pressing the esc or shift key.
      • macOS: The panel expands/collapses after releasing the spacebar.
    • Expected: The panel does not change its expanded/collapsed state.

Affected Component

No response

Expected Behaviour

No response

Isolated Example

No response

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.16.2

Browser

Edge

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

Labels

TOPIC RLbugThis issue is a bug in the code

Type

No type

Projects

Status

Code Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions