1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Bandaid for entity editing in Firefox, fix GH-188, GH-175

This commit is contained in:
krateng 2023-02-25 22:18:57 +01:00
parent a611b78dbc
commit e85861fb79

View File

@ -104,7 +104,13 @@ function createTrackCell(trackinfo) {
function editEntity() { function editEntity() {
var namefield = document.getElementById('main_entity_name'); var namefield = document.getElementById('main_entity_name');
namefield.contentEditable = "plaintext-only"; try {
namefield.contentEditable = "plaintext-only"; // not supported by Firefox
}
catch (e) {
namefield.contentEditable = true;
}
namefield.addEventListener('keydown',function(e){ namefield.addEventListener('keydown',function(e){
// dont allow new lines, done on enter // dont allow new lines, done on enter