mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(street-level): Esc shrinks the iPhone popover photo instead of collapsing the panel
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4682757e71
commit
83e6acc34d
2 files changed
+31
-2
No files matched your search
@@ -120,10 +120,18 @@ export class StreetLevelControls {
|
||||
this.listen(el.viewerExpand, 'click', () => this._toggleExpanded());
|
||||
if (this._expandMode === 'fullscreen')
|
||||
this.listen(document, 'fullscreenchange', () => this._syncExpanded());
|
||||
else
|
||||
else {
|
||||
this.listen(el.viewerWrap, 'toggle', (event) =>
|
||||
this._onPopoverToggle(event),
|
||||
);
|
||||
// Esc shrinks the photo before the panel's own Esc can collapse it.
|
||||
this.listen(el.viewerWrap, 'keydown', (event) => {
|
||||
if (event.key !== 'Escape' || !this.isViewerExpanded()) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this._exitExpanded();
|
||||
});
|
||||
}
|
||||
} else setProp(el.viewerExpand, 'hidden', true);
|
||||
for (const button of el.renderButtons) {
|
||||
this.listen(button, 'click', () => {
|
||||
|
||||
Reference in new issue
Block a user