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 in table not working in firefox #44

Closed ZXGuesser closed 7 years ago

ZXGuesser commented 8 years ago

The code in this.keypress at line 1308 is causing an exception on Firefox 47.0. I think because event is uninitialised at this point.

illarterate commented 8 years ago

I noticed this too. Seems to be the same in Chrome. Operating systems tested: Win10 & Win8.

ZXGuesser commented 8 years ago

the following seems to work in firefox (line 4329)

var fakepress = function(character) {
    if ( active_editor == null ) { return; } 

    active_editor.set_escape(1);
    event = new KeyboardEvent("keydown", {charCode : character.charCodeAt(0)});
    page_keypress(event);
}
rawles commented 8 years ago

Thanks for this fix. Apologies for the delay in applying it.

glxxyz commented 7 years ago

Unfortunately this fix broke the "click on table" functionality for Chrome, in a different way. I've applied a fix that works for both Chrome and Firefox.

rawles commented 7 years ago

Seems to work nicely in Firefox and Safari on my system. Thanks!

rawles commented 7 years ago

Works on my version of Safari (9.0.2).