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

Text also selected when using shift/alt click binds to hide or watch a thread in the catalog #131

Open
Hash6232 opened this issue Dec 22, 2024 · 7 comments

Comments

@Hash6232
Copy link

Maybe forcing an unfocus of the currently active element from within the shift/alt click event would to the trick: document.activeElement.blur();

2024-12-22.11-04-28-.00.03.332-00.11.867.webm
TuxedoTako added a commit that referenced this issue Dec 22, 2024
- Removed the css for the header for widths above 1300px, because it was preventing long custom navigation lists from
  wrapping. [#120](#120) I don't know what the purpose was of the different
  style, the commit where that was added isn't really descriptive: c396db4? So let me
  know if I broke something.
- Limit subject input to 100 characters. [#128](#128)
- Added ws and nsw classes for work safe and not work safe boards.
  [#129](#129)
- Using shift click to hide a post no longer selects half the page.
  [#131](#131)
- The file select dialog for the settings import will only show json files.
@TuxedoTako
Copy link
Owner

Can you try 2.19.0?

@Hash6232
Copy link
Author

Hash6232 commented Dec 22, 2024

Nope, issue is still there. I'm on firefox 133.0.3

@TuxedoTako
Copy link
Owner

Works on my machine? The selection disappears when a thread is hidden.

firefox_akVa7r434g.webm

@Hash6232
Copy link
Author

You are selecting text before using the shift click bind. What is actually happening in my case is that by clicking on the top left corner of the catalog and registering that point as active focus element and then using the shift click bind on another element in the catalog, the text inside the two corners of the rectangle will be selected.

2024-12-23.10-44-32-.00.03.883-00.15.067.webm

@Hash6232
Copy link
Author

Hash6232 commented Dec 23, 2024

I found a possible workaround while playing on a fiddle: https://jsfiddle.net/w61zfgsy/

Simply using e.preventDefault(); inside a mousedown event while shift is active is going to prevent the selection of any text. The only drawback is that you can't click and shift click inside the node to select text in two steps but considering the shift click bind was going to interfere anyway it's not a big deal (?)

el.onmousedown = (e) => {
    if (!e.shiftKey) return;
    e.preventDefault();
  }

@TuxedoTako
Copy link
Owner

I your video the selection disappears on the same frame the thread disappears. For me that is enough. Or do you want the blue flash to be completely gone?

@Hash6232
Copy link
Author

It does indeed. Although it would be cleaner not having a selection blinking in the first place whenever you want to to hide a thread, the current fix is good enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants