💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Disallows pointer down event bindings.
Pointer down events can cause accessibility issues because they don't work well with keyboard navigation. Use click or keydown events instead.
This rule disallows the use of pointerdown events in templates.
Examples of incorrect code for this rule:
<template>
<button {{on "pointerdown" this.handlePointerDown}}>Click</button>
</template><template>
<div onpointerdown={{this.handlePointerDown}}>Content</div>
</template>Examples of correct code for this rule:
<template>
<button {{on "click" this.handleClick}}>Click</button>
</template><template>
<button {{on "keydown" this.handleKeyDown}}>Press</button>
</template><template>
<div {{on "mousedown" this.handleMouseDown}}>Content</div>
</template>Replace:
<button {{on "pointerdown" this.action}}>With:
<button {{on "click" this.action}}>Or for keyboard support:
<button {{on "click" this.action}} {{on "keydown" this.handleKey}}>