selftiesoftware / core

The core integration of Reposcript into web technologies
Other
4 stars 0 forks source link

Browsers that both emits KeyPress and KeyDown events risk emitting an event twice #45

Open Jegp opened 7 years ago

Jegp commented 7 years ago

I just lost a bunch of text here. Tears were shred. Bunnies died. Go home invisible links!

When browsers emits KeyDown events as well as KeyPress events, there is a risk that two KeyDown events will be emitted for the same event. Solution: If the browser emits both, remove KeyDown events and convert at KeyPress to KeyUp :: KeyDown.

ghoranyi commented 7 years ago

Poor bunnies.

Jegp commented 7 years ago

Right @ghoranyi ?! It took me at least 3 minutes to write a much richer ticket than this version. Naturally I have to take it out on kittens and bunnies to teach the universe a lessen!