chore: Remove context menu on links (#6874)

This commit is contained in:
Pranav Raj S 2023-04-10 14:13:08 -07:00 committed by GitHub
parent ad75a79135
commit cf934450ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -444,9 +444,9 @@ export default {
this.hasImageError = true; this.hasImageError = true;
}, },
openContextMenu(e) { openContextMenu(e) {
const shouldSkipContextMenu = e.target?.classList.contains( const shouldSkipContextMenu =
'skip-context-menu' e.target?.classList.contains('skip-context-menu') ||
); e.target?.tagName.toLowerCase() === 'a';
if (shouldSkipContextMenu || getSelection().toString()) { if (shouldSkipContextMenu || getSelection().toString()) {
return; return;
} }