Commit f3d6995c authored by Georgios Ouzounis's avatar Georgios Ouzounis
Browse files

Avoid getting errors from browsers that haven't implemented some API calls

parent b36e9b66
......@@ -330,8 +330,16 @@ export default Ember.Controller.extend({
if(inputTopicsElement !== undefined && outputTopicsElement !== undefined){
inputTopicsElement.setCustomValidity(this.get('kafkaTopicsConflictMessage'));
outputTopicsElement.setCustomValidity(this.get('kafkaTopicsConflictMessage'));
inputTopicsElement.reportValidity();
outputTopicsElement.reportValidity();
// Some browsers (e.g. Firefox) haven't yet implemented the "reportValidity" API.
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
try{
inputTopicsElement.reportValidity();
outputTopicsElement.reportValidity();
}
catch(error){
console.log("Logging caught error: " + error);
}
this.set('kafkaTopicsValidityReported', true);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment