Skip to content

feat: allow intercepting mouse events#47280

Merged
codebytere merged 3 commits intomainfrom
prehandle-mouse-event
Jun 4, 2025
Merged

feat: allow intercepting mouse events#47280
codebytere merged 3 commits intomainfrom
prehandle-mouse-event

Conversation

@codebytere
Copy link
Copy Markdown
Member

Description of Change

Closes #15646.
Refs CL:6266792

Adds before-mouse-event to allow intercepting and preventing mouse events in WebContents.

Checklist

Release Notes

Notes: Added before-mouse-event to allow intercepting and preventing mouse events in WebContents.

@codebytere codebytere requested a review from a team May 27, 2025 12:23
@codebytere codebytere added semver/minor backwards-compatible functionality target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. labels May 27, 2025
@codebytere codebytere force-pushed the prehandle-mouse-event branch 2 times, most recently from a0e0f3b to 3c8b4c4 Compare May 27, 2025 14:43
Copy link
Copy Markdown
Member

@itsananderson itsananderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Copy link
Copy Markdown
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Copy link
Copy Markdown
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add test coverage in spec/api-web-contents-spec.ts? And optionally add it into spec/ts-smoke/electron/main.ts as well.

@codebytere codebytere force-pushed the prehandle-mouse-event branch from 3c8b4c4 to 69cd2d9 Compare June 2, 2025 19:10
@codebytere
Copy link
Copy Markdown
Member Author

@dsanders11 done!

@codebytere codebytere requested a review from itsananderson June 2, 2025 19:10
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
@codebytere codebytere merged commit fbb3fa7 into main Jun 4, 2025
59 checks passed
@codebytere codebytere deleted the prehandle-mouse-event branch June 4, 2025 12:10
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Jun 4, 2025

Release Notes Persisted

Added before-mouse-event to allow intercepting and preventing mouse events in WebContents.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Jun 4, 2025

I have automatically backported this PR to "37-x-y", please check out #47364

@trop trop bot added in-flight/37-x-y and removed target/37-x-y PR should also be added to the "37-x-y" branch. labels Jun 4, 2025
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Jun 4, 2025

I have automatically backported this PR to "36-x-y", please check out #47365

@trop trop bot added in-flight/36-x-y and removed target/36-x-y PR should also be added to the "36-x-y" branch. labels Jun 4, 2025
@trop trop bot added merged/37-x-y PR was merged to the "37-x-y" branch. merged/36-x-y PR was merged to the "36-x-y" branch. and removed in-flight/37-x-y in-flight/36-x-y labels Jun 5, 2025
kigh-ota pushed a commit to kigh-ota/electron that referenced this pull request Sep 30, 2025
* feat: allow intercepting mouse events

* test: add specs

* Update spec/api-web-contents-spec.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review/approved ✅ merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add event that can be used to listen for mouse and scroll events on a <webview>

4 participants