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

Middle-click to close panel sometimes pastes text in another location #552

Closed
mofojed opened this issue May 3, 2022 · 3 comments · Fixed by #594
Closed

Middle-click to close panel sometimes pastes text in another location #552

mofojed opened this issue May 3, 2022 · 3 comments · Fixed by #594
Assignees
Labels
bug Something isn't working golden-layout good first issue Good for newcomers
Milestone

Comments

@mofojed
Copy link
Member

mofojed commented May 3, 2022

Description

If you middle click to close a panel, it sometimes pastes in another panel. I think this is because the close is triggered on down instead of up.

Steps to reproduce

  1. Arrange tables like in the video. Can execute this query to get a table/plot:
from deephaven.plot.figure import Figure
from deephaven import read_csv

insurance = read_csv("https://media.githubusercontent.com/media/deephaven/examples/main/Insurance/csv/insurance.csv")
insurance_by_region = insurance.view(formulas=["region", "expenses"]).sum_by(["region"])

figure = Figure()
new_fig = figure.plot_pie(series_name="Insurance charges by region", t=insurance_by_region, category="region", y="expenses")
new_plot = new_fig.show()
  1. Close the plot panel with a middle click in the panel tab.

Expected results
2. Panel is closed, no text is pasted

Actual results
2. Panel is closed, but text from my clipboard is pasted into the console input

Additional details and attachments

middle-click.mp4

Versions

  • Deephaven: Version 0.11.7
  • OS: Ubuntu
  • Browser: Chrome
@mofojed mofojed added bug Something isn't working triage Issue requires triage labels May 3, 2022
@vbabich vbabich added golden-layout good first issue Good for newcomers and removed triage Issue requires triage labels May 4, 2022
@vbabich
Copy link
Collaborator

vbabich commented May 4, 2022

Should it be triggered on click and not mouse up/down?

@vbabich vbabich added this to the June 2022 milestone May 4, 2022
@dsmmcken
Copy link
Contributor

dsmmcken commented May 4, 2022

Noting: middle click paste is a linux only thing, maybe just needs a prevent default or something.

@dsmmcken
Copy link
Contributor

dsmmcken commented May 4, 2022

Assigned to @mofojed, none of us run linux so we won't easily be able to test if our fixes work. See golden-layout Tabs.js _onTabClick button === 1 should probably preventDefault.

mofojed added a commit to mofojed/web-client-ui that referenced this issue May 25, 2022
- Should be listening for `click` instead (function is named `onTabClick`)
- `click` doesn't fire for middle mouse button, need to listen to `auxclick` as well: https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
- Fixes deephaven#552
mofojed added a commit that referenced this issue May 25, 2022
- Should be listening for `click` instead (function is named `onTabClick`)
- `click` doesn't fire for middle mouse button, need to listen to `auxclick` as well: https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event
- Fixes #552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working golden-layout good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants