This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sn-filter-pane): reset zoom for all scenarios (#392)
- Loading branch information
1 parent
28e26a3
commit fe3ca8b
Showing
3 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Run this on small devices to reset the zoom. Required when focusing | ||
* an input field and the browser auto zooms the page. Browsers do not | ||
* expose any API for handling this currently. | ||
*/ | ||
export default function resetZoom() { | ||
const viewportMetaTag = document.querySelector('meta[name="viewport"]'); | ||
if (viewportMetaTag instanceof HTMLMetaElement) { | ||
viewportMetaTag.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; | ||
} | ||
} |