TSafetyCover - a panel with a protective cover over an area to prevent stray clicks - #1251
Open
belisoful wants to merge 3 commits into
Open
TSafetyCover - a panel with a protective cover over an area to prevent stray clicks#1251belisoful wants to merge 3 commits into
belisoful wants to merge 3 commits into
Conversation
belisoful
marked this pull request as ready for review
August 28, 2026 23:30
belisoful
marked this pull request as draft
August 28, 2026 23:31
Adds ResetDelay cooldown after it closes, default 0.
belisoful
marked this pull request as ready for review
August 29, 2026 06:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an unusual class. I don't think there is an equivalent "control" in other frameworks.
TSafetyCover — click-to-confirm cover control
Adds
TSafetyCover(since 4.4.0).A
TPanelwhose body content sits behind a click-to-open cover, guarding controlsthat act immediately (e.g. a delete button) against accidental activation.
TSafetyCoverdemo.mp4
Features
pointer-eventsguard re-blocks the contentthe instant it closes while a visible face animates; no click-through during
the close.
OverlayEffect=Slide/Collapse/None, anyOverlayDirection(Up/Down/Left/Right+ RTL-awareForward/Backward),independent
OverlayFade.OpenDelay(pulse),AutoCloseDelay,MouseOutTimeout,AnimationDuration;KeepOpenWhileActiveresets the auto-close on interaction soa complex interaction holds the cover open.
OverlayColor(sanitized),OverlayCssClass,OverlayTemplate,CssUrl.role="button"(Enter/Space),content is
inertwhile closed (with a no-inertfallback), focus management,aria-expanded, reduced-motion support.Files
TSafetyCover.php,TSafetyCoverEffect.php,TSafetyCoverDirection.phpsource/prado/controls/safetycover.js,assets/safetycover.cssclasses.phpandpackages.php.Tests
tests/unit/Web/UI/WebControls/TSafetyCoverTest.phptests/js/controls/safetycover.test.jsFull check suite green (php-cs-fixer, phpstan, phpunit, vitest, Playwright).