Hi guys, I'm trying to use webview on macOS, but I'm having problems scrolling the page, depending on how fast I drag up or down, the webview component also seems to move, if I drag slowly, the page scroll moves ... is there a way to prevent the webview from moving , just the scroll of the loaded page ?
video below :
https://imgur.com/a/r4qFcot
webview component moving when scrolling the mouse preventing the page from scrolling.
- skinkairewalker
- Enthusiast
- Posts: 556
- Joined: Fri Dec 04, 2015 9:26 pm
Re: webview component moving when scrolling the mouse preventing the page from scrolling.
What you see is not the WebGadget moving, but the webpage is "bouncing".
I know it's totally unnecessary but this is the way macOS (and iOS, iPadOS, etc.) shows fancy UI stuff.
Try this code with a colored window background and you will see that the gadget doesn't move:
I know it's totally unnecessary but this is the way macOS (and iOS, iPadOS, etc.) shows fancy UI stuff.
Try this code with a colored window background and you will see that the gadget doesn't move:
Code: Select all
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "https://www.purebasic.com")
; Note: if you want to use a local file, change last parameter to "file://" + path + filename
SetWindowColor(0, RGB(200, 100, 200))
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
I am to provide the public with beneficial shocks.
Alfred Hitshock
- skinkairewalker
- Enthusiast
- Posts: 556
- Joined: Fri Dec 04, 2015 9:26 pm
Re: webview component moving when scrolling the mouse preventing the page from scrolling.
how can i disable this ?
-
- Enthusiast
- Posts: 750
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: webview component moving when scrolling the mouse preventing the page from scrolling.
Have a look at CSS: https://caniuse.com/mdn-css_properties_ ... l-behavior. You should add a snippet like that to your .html.
That could do the trick. The bouncing is enabled by default on MacOS, so you can be sure, every user has it enabled...
That could do the trick. The bouncing is enabled by default on MacOS, so you can be sure, every user has it enabled...
Regards,
JamiroKwai
JamiroKwai