perf: Add right click exception on link elements (#899)

This commit is contained in:
Rémi Marseault 2023-06-26 13:16:27 +02:00 committed by GitHub
parent 942b1a9f65
commit b8324d96d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ export default {
const nodeName = event.target.nodeName.toLowerCase()
const nodeType = event.target.getAttribute('type')
if (nodeName === 'textarea') return
if (['textarea', 'a'].includes(nodeName)) return
if (nodeName === 'input' && ['text', 'password', 'email', 'number'].includes(nodeType)) return
event.preventDefault()