f18.js: fix it for IE (Forum #96921)

git-svn-id: https://svn.fhem.de/fhem/trunk@19120 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2019-04-05 15:53:26 +00:00
parent 04ffbd8b01
commit 6092e088d6

View File

@@ -845,12 +845,14 @@ f18_textInput()
var n = "FW_mainTextInput";
var aCM = typeof AddCodeMirror == 'function';
$("body").append(
`<div id="${n}">
<textarea rows="20" cols="60" style="width:99%;${aCM?'opacity:0;':''}"/>
</div>`);
'<div id="'+n+'">'+
'<textarea rows="20" cols="60" style="width:99%;'+(aCM?'opacity:0;':'')+'"/>'+
'</div>');
var ta = $("#"+n+" textarea");
if(aCM)
AddCodeMirror(ta, (cm) => cm.on("change", () => ta.val(cm.getValue()) ) );
AddCodeMirror(ta, (cm), function() {
cm.on("change", function(){ ta.val(cm.getValue()) } );
});
$("#"+n).dialog({
dialogClass:"no-close", modal:true, width:"auto", closeOnEscape:true,