-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from krksgbr/prevent-scroll
Allow preventing scroll when an element is focused
- Loading branch information
Showing
4 changed files
with
43 additions
and
1 deletion.
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,19 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="stylesheet" href="styles.css" /> | ||
</head> | ||
<body> | ||
<div class="nav-group" style="display: flex; gap: 100vw"> | ||
<div><button id="prevent">First Button</button></div> | ||
<div><button data-focus-prevent-scroll>Don't scroll here</button></div> | ||
</div> | ||
|
||
<div class="nav-group" style="display: flex; gap: 100vw" id="no-prevent-scroll"> | ||
<div><button id="no-prevent">First Button</button></div> | ||
<div><button>Scroll Here</button></div> | ||
</div> | ||
<script src="../../index.js"></script> | ||
</body> | ||
</html> |
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