Fix: Filterable Gallery video lightbox requires two taps on Android (gate hover-only overlay)#819
Open
sadmansakibnadvi wants to merge 1 commit into
Conversation
…r capability Touch / no-hover devices (Android Chrome, Samsung Internet) consumed the first tap on a video tile as a hover-reveal, requiring a second tap to open the lightbox. Apply the hover scale and overlay reveal only under @media (hover: hover) and (pointer: fine) so the first tap activates on touch. The play icon remains always visible, so the tap target is unchanged. Compiled assets (filterable-gallery.css/.min.css) hand-edited to mirror the SCSS; maintainers should re-run the build to confirm byte parity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Executive Summary
On Android (Chrome, Samsung Internet) the video play overlay needs two taps to open the lightbox; the first tap is consumed as a hover-reveal. This gates the video overlay's hover-only effects behind
@media (hover: hover) and (pointer: fine)so touch devices have no hover-dependent state change and the first tap activates the lightbox. Customer-facing, lowest risk of the set, isolated to one SCSS file (+ compiled assets).Problem Statement
.video-popup-bgisvisibility:hidden; opacity:0, revealed only via.eael-gallery-grid-item:hover, and the play icon scales via.video-popup:hover>img. On touch the sequencetouchstart → mouseover(:hover) → clickcauses Android to consume the first tap as a hover-reveal and require a second tap. iOS Safari resolves the tap to a click, so the bug is Android-specific.Root Cause
Hover is the only interaction path for the video overlay, with no touch fallback. A repo-wide grep of
src/css/view/filterable-gallery.scssfor@media (hover…)/hover: none/pointer:returns zero guards. Source:src/css/view/filterable-gallery.scss:530and:540.Technical Solution
Wrap the two hover-only rules in
@media (hover: hover) and (pointer: fine). The play icon (.video-popup>img) is already always visible, so on touch the tile stays fully tappable and the first tap opens the lightbox. No new always-on styles.Detailed File Changes
src/css/view/filterable-gallery.scss— gate video-overlay hover effects behind hover capability.assets/front-end/css/view/filterable-gallery.css/.min.css— regenerated compiled output (npm run build); ships compiled CSS.QA Checklist
Desktop (hover must still work): [ ] Chrome [ ] Firefox [ ] Safari [ ] Edge — hover scales icon + reveals bg; click opens lightbox.
Mobile (single-tap): [ ] Android Chrome (acceptance) [ ] Samsung Internet [ ] iOS Safari — one tap opens video.
Widget modes: [ ] Card [ ] Search & Filter (incl. after filter + Load More).
Content: [ ] Image (unchanged) [ ] Video (single-tap on Android).
Regression Checklist
[ ] Desktop hover timing (300/350ms) unchanged. [ ] No layout shift on touch. [ ] Windows touch laptops (
hover: hover) keep hover effects. [ ] Android tablets (hover: none) get tap-first. [ ] Masonry + fitRows verified.Accessibility Review
No DOM/semantic change. Keyboard activation via the anchor unaffected. Touch users gain reliable single-activation.
Backward Compatibility
Fully compatible. No classes/markup/settings change. Only intended delta: decorative dark overlay not shown on first tap on touch.
Risk Assessment
Low. One SCSS file + compiled assets. Worst case cosmetic (overlay not shown on touch), not functional.
Rollback
Revert the single commit (SCSS + compiled CSS). No migration.
Release Notes
Fixed: Filterable Gallery video items now open on the first tap on Android (Chrome, Samsung Internet). Hover overlay effects are now limited to devices that support hovering.
Reviewer Notes
Same hover-only pattern exists for
.card-hover-bg(scss:556-565), hoverer captions (426/479), layout-3 categories (1042). Scoped here to the validated video root cause; recommend a follow-up applying the same guard. Deliberately did not force the dark bg visible on touch (play icon already visible) to avoid changing the touch visual.