
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-scrollbouncefix
Advanced tools
A ReactJS component which stops elastic bouncing from moving the entire page(body) when scrollable element has reached the extremes.
This is a ReactJS implementation of @jaridmargolin's bouncefix.js
IOS (since IOS 5) offers native touch scrolling within nested containers via -webkit-overflow-scrolling: touch;
, however, if scrolling occurs at one of the extremes, top or bottom, the elastic bounce occurs on the page rather than the nested container. bouncefix.js
offers a viable solution to fix this issue. react-bouncefix
is a reuseable component for ReactJS based applications
note: If there is no content to scroll, scrolling is blocked on the container. This may cause issues if attempting to implement a scroll to refresh feature. This can be overcome creating a wrapper inside of your container and setting the height to 100% with a top and bottom padding of 1px (Not perfect, hackish, but it works)
##Install
npm install react-bouncefix
##Example For documentation on how to use react, check out http://facebook.github.io/react/docs/getting-started.html
####For projects using JSX
/** @jsx React.DOM */
var Bouncefix = require('react-bouncefix');
var MyComponent = React.createClass({
render: function() {
return (
<Bouncefix className="Bouncefix">
Hello from MyComponent!
</Bouncefix>
);
}
});
React.renderComponent(
MyComponent,
document.getElementById('container')
);
Add to your css
.Bouncefix {
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
##Parameters
#####component
By default this will be a div
, however, you may specify any React supported element. See http://facebook.github.io/react/docs/tags-and-attributes.html#html-elements
<Bouncefix className="Bouncefix" componentClass="ul">
Hello from MyComponent!
</Bouncefix>
FAQs
A ReactJS component to stop elastic bouncing on body
The npm package react-scrollbouncefix receives a total of 9 weekly downloads. As such, react-scrollbouncefix popularity was classified as not popular.
We found that react-scrollbouncefix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.