title: Problem with PrimeFaces TextEditor in Dialog after update from PrimeFaces 7 to 8
body: <p>I have a JSF application with PrimeFaces that I'm updating to PrimeFaces version 8 (currently using version 7).</p>
  <p>After updating I have a strange behaviour with a TextEditor in a dialog. I open the dialog with a commandLink and update the dialog to refresh its contents. When I do this I get an error on the JavaScript console.</p>
  <pre><code>texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7 Uncaught TypeError: Cannot read property 'innerHTML' of null
      at e.value (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
      at new e (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
      at texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7
      at Array.map (&lt;anonymous&gt;)
      at e.value (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
      at e.value (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
      at e.value (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
      at texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7
      at Array.forEach (&lt;anonymous&gt;)
      at e.value (texteditor.js.xhtml?ln=primefaces&amp;v=8.0:7)
  </code></pre>
  <p>The error comes from the code:</p>
  <pre><code>a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), &quot;selectItem&quot;, this).call(this, t, n), t = t || this.defaultItem, this.label.innerHTML = t.innerHTML
  </code></pre>
  <p>where t is null so t.innerHTML throws the error.</p>
  <p>However - if I only open the dialog but don't udpate it - everything works fine.</p>
  <p>I created a minimal sample. First fink works fine, second link creates the error.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
        xmlns:p=&quot;http://primefaces.org/ui&quot;
        xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
  &gt;
  
  &lt;h:head&gt;
      &lt;meta content=&quot;text/html; charset=UTF-8&quot; http-equiv=&quot;Content-Type&quot;/&gt;
      &lt;title&gt;test&lt;/title&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;h:form id=&quot;contentForm&quot;&gt;
          &lt;p:commandLink value=&quot;works&quot;
                         oncomplete=&quot;PF('dialogTemplateSendMailToPersonVar').show()&quot;/&gt;
          &lt;br/&gt;
          &lt;p:commandLink value=&quot;does not work&quot;
                         oncomplete=&quot;PF('dialogTemplateSendMailToPersonVar').show()&quot;
                         update=&quot;:templatePersonSendMailForm&quot;/&gt;
      &lt;/h:form&gt;
  
      &lt;p:dialog id=&quot;dialogTemplateSendMailToPersonId&quot; widgetVar=&quot;dialogTemplateSendMailToPersonVar&quot; dynamic=&quot;true&quot;&gt;
          &lt;h:form id=&quot;templatePersonSendMailForm&quot;&gt;
  
              &lt;p:textEditor id=&quot;txtTemplateText&quot; /&gt;
  
          &lt;/h:form&gt;
      &lt;/p:dialog&gt;
  &lt;/h:body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>In this sample the update is useless, but produces the same error as with my full page where I have backing beans that fill the editor and other fields in the dialog.</p>
  <p>Has anybody experienced something similiar or any idea how to fix this? I checked the release notes for the PrimeFaces 8.0.x versions, but didn't see any issue with TextEditor. Not updating the dialog is not an option ;-)</p>