mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ignore bidi event handling on non-existent and non-Input elements
Closes #999
This commit is contained in:
parent
d9d65d59d1
commit
c797073c05
@ -303,6 +303,9 @@ RED.editor = (function() {
|
||||
*/
|
||||
function preparePropertyEditor(node,property,prefix,definition) {
|
||||
var input = $("#"+prefix+"-"+property);
|
||||
if (input.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (input.attr('type') === "checkbox") {
|
||||
input.prop('checked',node[property]);
|
||||
}
|
||||
@ -316,10 +319,12 @@ RED.editor = (function() {
|
||||
RED.text.format.attach(input[0], definition[property].format, {}, false, "en");
|
||||
} else {
|
||||
input.val(val);
|
||||
if (input[0].nodeName === 'INPUT' || input[0].nodeName === 'TEXTAREA') {
|
||||
RED.text.bidi.prepareInput(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an on-change handler to revalidate a node field
|
||||
@ -1179,7 +1184,7 @@ RED.editor = (function() {
|
||||
}
|
||||
|
||||
configNodes.forEach(function(cn) {
|
||||
select.append('<option value="'+cn.id+'"'+(value==cn.id?" selected":"")+'>'+cn.__label__+'</option>');
|
||||
select.append('<option value="'+cn.id+'"'+(value==cn.id?" selected":"")+'>'+RED.text.bidi.enforceTextDirectionWithUCC(cn.__label__)+'</option>');
|
||||
delete cn.__label__;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user