score:2
Accepted answer
div{
user-select: none;
height: 100px;
overflow: scroll;
}
<div>
lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim. donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. in enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. nullam dictum felis eu pede mollis pretium. integer tincidunt. cras dapibus. vivamus elementum semper nisi. aenean vulputate eleifend tellus. aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. phasellus viverra nulla ut metus varius laoreet. quisque rutrum. aenean imperdiet. etiam ultricies nisi vel augue. curabitur ullamcorper ultricies nisi. nam eget dui. etiam rhoncus. maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. maecenas nec odio et ante tincidunt tempus. donec vitae sapien ut libero venenatis faucibus. nullam quis ante. etiam sit amet orci eget eros faucibus tincidunt. duis leo. sed fringilla mauris sit amet nibh. donec sodales sagittis magna. sed consequat, leo eget bibendum sodales, augue velit cursus nunc,
</div>
don't use pointer-events
- use user-select
Source: stackoverflow.com
Related Query
- Can't scroll while using pointer-events: auto; property
- Cannot read property 'type' of undefined while using react-select with formik
- Cannot read property 'conversationId' of undefined while using a reducer function
- Property 'rawValue' does not exist on type 'EventTarget & HTMLInputElement' error while using typescript with cleave.js
- vendors.js: Uncaught TypeError: Cannot read property 'apply' of undefined while using webpack
- Auto scroll to anchor tag element in react using componentDidUpdate
- TypeError: Cannot read property 'onMonthSelect' of undefined while using "useRef"
- TypeError: Cannot read property 'offsetHeight' of null when using the Locomotive Scroll react module
- Uncaught TypeError: Cannot read property 'length' of null- while using -http://localhost:8080/
- In react while using function ,it's property not showing on screen
- Facing issue while updating auto increment counter value in react.js using useEffect Hook
- React hook's state using scroll events issue
- TypeError: Cannot set property 'innerHTML' of null while using React.Js
- How to receive SocketIO events in React while using states
- error: Property undefined while fetching data using API
- getting the error Cannot read property 'value' of undefined in react while using arrow function
- Getting this error while using context API. TypeError: Object is not iterable (cannot read property Symbol(Symbol.iterator))
- TypeError: Cannot read property 'image' of undefined while using react router
- TypeError: Cannot read property of undefined while using spotify's api
- React JS: onClick not working; cant put a "line-through" display property using onClick
- Getting according to auto scroll to content in React using Semantic-UI React components
- Uncaught TypeError: Cannot read property 'map' of undefined while using Rcipe API
- Default property value in React component using TypeScript
- Typescript complains Property does not exist on type 'JSX.IntrinsicElements' when using React.createClass?
- Is it better to define state in constructor or using property initializers?
- React with Typescript -- Generics while using React.forwardRef
- Check if property exists using React.js
- public, src,and scripts folder not created while using create-react-app
- TypeError when using React: Cannot read property 'firstChild' of undefined
- Using React Hooks To Update w/ Scroll
More Query from same tag
- Is there a way to universally cancel all calls to setstate on any unmounted component or to hide the errors produced by attempting it?
- DOM still shows items which are have already been deleted from state in React using hooks
- Is node.js with reactjs as php template rendering service a good idea?
- How can I render list items dynamically and recursively from a nested array?
- react component this.value is null even when it's populated
- React hooks object update gets strange behaviour on Safari browser
- MUI - How can I style the scrollbar with CSS in JS?
- I have a problem with the 'getStaticPaths' function. A required parameter (id) was not provided as a string in getStaticPaths
- get asset images dynamically in React.js
- Cant apply column on row with flexbox
- React - Substitute for `setState` Callback in Functional Components?
- Unhandled rejection using setState in .map loop
- Very simple state change of specific array item in React
- Dispatch another action / call another reducer within a reducer
- Is there a way to use a certain font for <p> on Tailwind Typography
- How to pass prop to eventhandler?
- Retrieve file from firebase storage
- Why my Cart.js is not rendering? React-Router
- What does "isomorphic React" mean?
- How to use Emscripten compiled JavaScript within React / React Native
- react native and useFocusEffect duplicate data when navigating back
- Pass all state values to child component
- What is the best way to set object properties when filling a complex form in React
- How do I auto-populate field B after field A is filled from a select options drop down in React
- Argument of type 'Promise<any>' is not assignable to parameter of type 'string'
- Rendering optimization using nested state in React
- change classname of element based on route in react router
- @types/react-router-dom gives errors when vite build
- How do I pass the props from this child component to the parent form
- React state (hook) resets on re-render while using switch