MCPcopy Create free account
hub / github.com/testing-library/user-event / up

Method up

src/system/pointer/pointer.ts:107–118  ·  view source on GitHub ↗
(instance: Instance, button: MouseButton = 0)

Source from the content-addressed store, hash-verified

105 }
106
107 up(instance: Instance, button: MouseButton = 0) {
108 if (!this.isDown) {
109 return
110 }
111 const target = this.getTarget(instance)
112
113 assertPointerEvents(instance, target)
114
115 this.isPrevented = false
116 this.isDown = false
117 instance.dispatchUIEvent(target, 'pointerup', this.getEventInit(button))
118 }
119
120 release(instance: Instance) {
121 const target = this.getTarget(instance)

Callers

nothing calls this directly

Calls 3

getTargetMethod · 0.95
getEventInitMethod · 0.95
assertPointerEventsFunction · 0.90

Tested by

no test coverage detected