Comment 2 for bug 1807523

Revision history for this message
Bill Erickson (berick) wrote :

Thanks for the bug/patch, Jane! I eyeballed the patch and it will certainly get the job done. However, I'm hesitant to apply predictable DOM ID's to components where multiple instances could be active in a single page, since the possibility exists for ID's to get clobbered. (Not terribly likely in this case, but certainly possible).

Perhaps we could teach FmEditorComponent to add a bit of randomness to its field IDs. E.g.

TS
ngOnInit() {
  ...
  this.domId = 'fm-editor-' + Math.random();
}

HTML
<input id='{{this.domId}}-{{field-name}}' ... />