rawles / edit.tf

An in-browser editor for teletext frames.
http://edit.tf/
GNU General Public License v3.0
92 stars 19 forks source link

Clicking on the tools does not work in Safari #55

Closed hairydalek closed 7 years ago

hairydalek commented 8 years ago

In Firefox on a Mac, I can insert control codes from the list on the left by clicking on them.

Is Safari on a Mac, I can’t. Those clicks do not work.

dodginess commented 8 years ago

This has something to do with Safari not creating the KeyboardEvent object correctly - what the code is trying to do at that point is simulate a key press based on whatever button you just clicked on. The solution might be to put that code in a try/catch block and use a deprecated method of capturing the keydown event if an exception is generated.

rawles commented 7 years ago

Yes, this sort of thing is certainly browser-specific behaviour and I've had other people say that similar things don't work for them.

This might help:

http://stackoverflow.com/questions/961532/firing-a-keyboard-event-in-javascript

rawles commented 7 years ago

This is a duplicate of #44.