Closed httnn closed 1 year ago
I'd say yeah, let's make it configurable - and yeah, let's default it to yes. I view cacao as an opinionated approach to macOS/iOS stuff, and I agree most people would want this defaulted - but it's certainly conceivable that someone might want the default behavior.
This makes enough sense from a UX perspective that I'm going to go ahead and merge it, and we can see if someone PR's needing the opposite approach. Thanks for the contribution!
yeah, i think most macOS apps behave this way which is why users have probably grown to expect this behaviour and why it makes sense to make this behaviour the default. thanks for merging! :)
this change implements the
acceptsFirstMouse
method on the webview class always returningYES
from it.https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html
there are at least two remaining questions:
webview.set_accepts_first_mouse(bool)
i can't think of a scenario where someone wouldn't want a webview to behave this way since swallowing the first mouse-down event on a window seems like bad UX to me. i might be missing something obvious though.