Skip to main content

isModifiedClick

Whether the browser should handle a click itself (new tab, new window, download) instead of the app navigating in place: true for a ctrl/cmd/shift/alt click or a non-primary button.

Parameters​

NameTypeDescription
eventMouseEvent | KeyboardEvent | nullThe click event.

Returns false without an event.

Usage​

import { isModifiedClick } from '@conduction/nextcloud-vue'

onLinkClick(event) {
if (isModifiedClick(event)) {
return // let the browser open it
}
event.preventDefault()
// …navigate in place
}

followLinkClick wraps this for the common case.