Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: BrowserWindows.on('swipe') doesn't trigger when swiping on BrowserViews #37628

Closed
3 tasks done
quanglam2807 opened this issue Mar 21, 2023 · 1 comment · Fixed by #37946
Closed
3 tasks done
Labels
bug 🪲 has-repro-comment Issue has repro in comments

Comments

@quanglam2807
Copy link
Contributor

Preflight Checklist

Electron Version

23.1.4

What operating system are you using?

macOS

Operating System Version

macOS Ventura 13.2.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

22.3.3

Expected Behavior

 const win = new BrowserWindow({ width: 800, height: 600 })

const view = new BrowserView();
win.setBrowserView(view);
view.setBounds({ x: 0, y: 0, width: 300, height: 300 });
view.webContents.loadURL('https://electronjs.org');

win.on('swipe', (e, direction) => {
    console.log('swipe', direction);
});

BrowserWindow.on('swipe') should be called whenever users swipe anywhere in the window (inside or outside of the BrowserView WebContents).

Actual Behavior

BrowserWindow.on('swipe') is only called when swiping inside the BrowserWindow WebContents (outside of the BrowserView, not when swiping inside the BrowserView.

Testcase Gist URL

No response

Additional Information

No response

@quanglam2807 quanglam2807 changed the title [Bug]: BrowserWindows.on('swipe') [Bug]: BrowserWindows.on('swipe') doesn't trigger when swiping in BrowserViews Mar 21, 2023
@quanglam2807 quanglam2807 changed the title [Bug]: BrowserWindows.on('swipe') doesn't trigger when swiping in BrowserViews [Bug]: BrowserWindows.on('swipe') doesn't trigger when swiping on BrowserViews Mar 21, 2023
@jkleinsc jkleinsc added the has-repro-comment Issue has repro in comments label Mar 21, 2023
@codebytere
Copy link
Member

Looks like this broke in 8a926ff cc @nornagon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 has-repro-comment Issue has repro in comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants