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

Don't change line when window isn't focused on mouse click #388

Closed
bhajneet opened this issue Jan 26, 2020 · 6 comments · Fixed by #577
Closed

Don't change line when window isn't focused on mouse click #388

bhajneet opened this issue Jan 26, 2020 · 6 comments · Fixed by #577
Assignees
Labels
Effort 1 Simple task (code/non-code). Impacts Some Affects the average end-user. Scope: Frontend/Presenter

Comments

@bhajneet
Copy link
Member

Someone may click from a different window onto the main window to focus it, but currently it will also change lines when doing this.

Personally this was how I even figured out we had this feature, however I can see how it would be annoying to some users. So unless the app is already in focus, I don't think we should activate this hotkey.

Thoughts?

@bhajneet bhajneet added Impacts Most Affects a majority of end-users. ○ Type Bug Regressions/production issues that do not function as intended. Status: In Research Scope: Frontend/Presenter labels Jan 26, 2020
@Harjot1Singh
Copy link
Member

Agreed

@Harjot1Singh Harjot1Singh added the Effort 1 Simple task (code/non-code). label Feb 27, 2020
@bhajneet bhajneet added Impacts Some Affects the average end-user. and removed Impacts Most Affects a majority of end-users. labels May 3, 2020
@saihaj
Copy link
Member

saihaj commented May 29, 2020

What I tried to reproduce this issue:

  1. Open shabadOS and display a shabad
  2. Hide controller and then click with mouse to change
  3. Click on some other window (Vscode in this case) to focus out from shabadOS window
  4. Refocusing on shabadOS window, line doesn't change.
  5. Click once more and line changes

From what I understand, on step 4 lines are changing (1 click does that). But for me I have to make one more click to change lines (first click to focus window and then the next click to change line).

If I am doing this wrong @bhajneet please post the steps. If the expected behavior is take 2 clicks (one to focus window and then other to change line) then I think it might have gotten resolved magically 😄

Note: Tested on dev branch HEAD: c8bd3af and release V2.7.0 on MacOS 10.15.5

@bhajneet
Copy link
Member Author

This is how I reproduced on dev branch using npm start

issue

@saihaj
Copy link
Member

saihaj commented May 29, 2020

Platform specific issue

2020-05-29 13 08 38

@Harjot1Singh
Copy link
Member

Mac and windows handle focus events differently. Namely, Mac does not allow clicks until the window is focused (so you must double-click to click a line), whilst in Windows, anything can be clicked, focus or not. Thus, it should be noted that on Windows, both focus and click fire at the same time, which is a little frustrating.

Two solutions I played with:

  1. Allow mouse-click slides only once a defocused window has been clicked once. The downside is that clicking the current taskbar will not trigger this, and therefore in circumstance that a user focuses the window by clicking the taskbar, and then the screen, an extra click will be required.

  2. Adding a timeout to the onFocus event, so that when the click is fired at the same time, it will be ignored. However, the downside of this is that onClick actually fires only on mouseUp, which means that if the user clicks on the screen slowly or holds the mouse longer than the timeout, the line will change.

I lean towards solution 1. Thoughts @bhajneet?

TTR: 1hr

@bhajneet
Copy link
Member Author

bhajneet commented Jun 3, 2020 via email

Harjot1Singh added a commit to Harjot1Singh/presenter that referenced this issue Jun 3, 2020
@Harjot1Singh Harjot1Singh added Status: Merge and removed ○ Type Bug Regressions/production issues that do not function as intended. Status: To Do labels Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort 1 Simple task (code/non-code). Impacts Some Affects the average end-user. Scope: Frontend/Presenter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants