json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

Only allow mouse button 0 to open links in 'mousedown' event

Open FlaminSarge opened this issue 3 years ago • 1 comments

Currently, clicking any mouse button on a link will cause it to open the link; this prevents using e.g. right-click context menu on the link, and may grab mouse4/mouse5 inputs and use them as regular clicks. This change makes it so this mousedown override only applies to M1 (usually left click, but should support users that flip their mouse buttons as well).

Also fix typo for 'isReadOn(l)y'

FlaminSarge avatar Jan 18 '21 11:01 FlaminSarge

@tulios Why does this mousedown override exist at all, when the ext already makes links clickable (and can therefore add target=_blank on those anchor tags in the first place)?

FlaminSarge avatar Jan 18 '21 11:01 FlaminSarge