KEMBAR78
feat: add events for backdrop click and detail Escape press by web-padawan · Pull Request #9062 · vaadin/web-components · GitHub
Skip to content

Conversation

@web-padawan
Copy link
Member

@web-padawan web-padawan commented May 7, 2025

Description

Part of #9049

Added two events that can be used to determine if the detail content should be removed:

  • backdrop-click (only in the overlay mode)
  • detail-esape-press (in all modes)

Note: in the overlay mode some users might expect global Escape to work the same as in dialog, i.e. without the need to have detail area focused (which can happen if you click on the blank space below inputs in detail-content).

However, implementing that would be somewhat tricky as the global keydown listener could interfere with vaadin-overlay-escape-press event - so we would need to have some way to detect if Escape is being handled elsewhere. This would also require integration tests for all components that handle Escape internally, using it for clear button and closing overlay.

So IMO it's easier to add explicit keydown listener on the detail part for now, and discuss the above case separately.

Type of change

  • Feature

@web-padawan web-padawan requested a review from sissbruecker May 7, 2025 09:03
@web-padawan web-padawan force-pushed the feat/mdl-esc-backdrop-click branch from 1c9b5d9 to 7af88ca Compare May 7, 2025 12:02
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 7, 2025

@web-padawan web-padawan merged commit fac6784 into main May 7, 2025
9 checks passed
@web-padawan web-padawan deleted the feat/mdl-esc-backdrop-click branch May 7, 2025 12:38
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.8.0.rc2 and is also targeting the upcoming stable 24.8.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants