Bug with triple click

Triple click is convenient to quickly select a paragraph to create a cloze. But, the triple click seems to be selecting also the start of the following line, which leads to mistakes like this (I triple click over “a” and press the hotket for cloze):
image

Thanks,

Windows 10
Version ⁨2.1.49 (dc80804a)⁩
Python 3.8.6 Qt 5.14.2 PyQt 5.14.2

The triple click is causing the newline character to be selected. This seems to be Chrome/Chromium-specific behavior (Anki uses a webview based on Chromium). I don’t know if Anki can do anything to solve this.

Compare the difference:
demo

2 Likes

Please, tell me if the correct place to report this bug is this site:
https://bugs.chromium.org/p/chromium/issues/list

I try to live with this bug, but it really makes me less efficient.

As a workaround until the bug is patched mainstream, you can always double click but keeping pressed after the second click, then drag from start to end of the paragraph. Not as efficient, but still better than nothing.

The fastest workaround is probably shift+left after triple-clicking, which will remove the newline from the selection.

@davidcortez I don’t recommend filing a bug report unless you know how to reproduce this in Chrome in a contenteditable container, as they are probably not interested in reports about issues with third-party apps.

In case someone else needs a solution for this, this Autohotkey script seems to solve the problem (I modified from this script):

SetTitleMatchMode, 2 ; 
#IfWinActive, ahk_exe anki.exe

~LButton::
if (a_timesincepriorhotkey != -1 && a_timesincepriorhotkey<200)
	cnt += 1
else if (a_timesincepriorhotkey > 400)
	cnt := 0

if (cnt == 1)
	var := "double click" 
if (cnt == 2)
	var := "triple click"
if (cnt == 3)
	var := "quadra click"

settimer executeprogram, -400
return

executeprogram:
if (var == "triple click") {
		Send, {Shift Down}
		Send, {Left}
		Sleep, 100 ; Delay in milliseconds
		
	Send, {Shift Up} 
	}

var := ""
return
1 Like