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 can't be selected when using simple theme with JS enabled #794

Closed
chayleaf opened this issue Jan 20, 2022 · 6 comments · Fixed by #997 or #1322
Closed

Text can't be selected when using simple theme with JS enabled #794

chayleaf opened this issue Jan 20, 2022 · 6 comments · Fixed by #997 or #1322

Comments

@chayleaf
Copy link

(Commit: 96ab5e5, most likely reproducible on master)

When using the "simple" theme, try selecting any text in the search results. It won't get selected, presumably because of a custom selection event handler. Said event handler should not prevent text from being selected (For example, personally I rely on being able to do that a lot). Also, text can be selected with JS disabled.

@return42
Copy link
Member

Is this related to #778 ? .. would your issue resolved by this suggestion #778 (comment) ?

@not-my-profile
Copy link
Contributor

No this issue is not about the autocompletion, it's about the actual results.

return42 added a commit to return42/searxng that referenced this issue Mar 20, 2022
Closes: searxng#794
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member

@pavlukivan sorry for the delay .. could you please give it a try; I prepared PR #997 to fix the issue.

@mrpaulblack
Copy link
Member

The bug fix for this issue contained another bug: #1002. Because of that the bug fix got reverted on master for now until we have a proper fix; Reopening.

@mrpaulblack mrpaulblack reopened this Mar 25, 2022
@mrpaulblack mrpaulblack added this to To do in Simple theme tasks via automation Mar 28, 2022
return42 added a commit to return42/searxng that referenced this issue Jun 14, 2022
For keyboard navigation the highlightResult() function in keyboard.js steals the
focus.  On a mouse click event (non keyboard action) the focus should resist
where it is, otherwise a marked region gets lost.  This is the reason why text
can't be selected when using simple theme with JS enabled.

Closes: searxng#794
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this issue Jun 14, 2022
For keyboard navigation the highlightResult() function in keyboard.js steals the
focus.  On a mouse click event (non keyboard action) the focus should resist
where it is, otherwise a marked region gets lost.  This is the reason why text
can't be selected when using simple theme with JS enabled.

Closes: searxng#794
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@chayleaf
Copy link
Author

chayleaf commented Jun 16, 2022

as of commit 36184b2, I still can't select text

edit: nvm the script was cached, it works properly now!

@return42
Copy link
Member

nvm the script was cached,

This is a pitfall I also often tap .. thanks for verifying 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment