material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

body ScrollBar disappear on clicking Text Field or TablePagination row page

Open charbel911 opened this issue 1 year ago • 2 comments

hii i've an issue where i noticed in every clickable mui component so when i click for example on Text Field or Table Pagination row page the body scroll disappear any solution for it i know that in Select Component for example we use disableScrollLock but this option not working with others components

charbel911 avatar Dec 14 '22 13:12 charbel911

Please provide a minimal reproduction test case with the latest version. This would help a lot 👷. A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

zannager avatar Dec 15 '22 07:12 zannager

https://codesandbox.io/s/modest-hooks-s0k53z?file=/src/TableData.js:55-65 please check this demo test so when you click on row per page notice that the body scroll is disappearing

charbel911 avatar Dec 15 '22 09:12 charbel911

https://codesandbox.io/s/modest-hooks-s0k53z?file=/src/TableData.js:55-65 please check this demo test so when you click on row per page notice that the body scroll is disappearing

Can you post a recording? I could not reproduce from the Sandbox you provided.

siriwatknp avatar Dec 19 '22 10:12 siriwatknp

scroll bug.webm

charbel911 avatar Dec 19 '22 13:12 charbel911

same effect with Select and Textfield

theRedCount avatar Jun 30 '23 17:06 theRedCount

@landerover yes sure but unfortunately i did not receive any fixing solution

charbel911 avatar Jul 03 '23 07:07 charbel911

I managed to solve this problem. Basically I need to display it on all my application otherwise I have graphic problems with the background image. So I just added !important to the css rule I already wrote, as follow:

html,
body {
     overflow-y: scroll !important;
}

theRedCount avatar Jul 03 '23 07:07 theRedCount

@landerover thank you it works

charbel911 avatar Jul 03 '23 07:07 charbel911

Here is the workaround i had for this https://github.com/mui/material-ui/issues/17353#issuecomment-1401753708

sedatbasar avatar Sep 13 '23 15:09 sedatbasar