mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Merge pull request #964 from PeterKwesiAnsah/fix-mobile-scrollbar
Fix mobile scrollbar
This commit is contained in:
commit
e65581c77e
1 changed files with 19 additions and 0 deletions
|
@ -390,6 +390,25 @@ const Device = ({ isPrimary, device, setIndividualDevice }: Props) => {
|
|||
})();
|
||||
}, [isInspecting]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!ref.current || !device.isMobileCapable) {
|
||||
return;
|
||||
}
|
||||
|
||||
const webview = ref.current;
|
||||
webview.addEventListener('dom-ready', () => {
|
||||
webview.insertCSS(`
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
} `);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return () => {
|
||||
webview.removeEventListener('dom-ready', () => {});
|
||||
};
|
||||
}, [device.isMobileCapable]);
|
||||
|
||||
const scaledHeight = height * zoomfactor;
|
||||
const scaledWidth = width * zoomfactor;
|
||||
|
||||
|
|
Loading…
Reference in a new issue