diff --git a/dist/pep-p.es.js b/dist/pep-p.es.js index 2c41a63..82d4e02 100644 --- a/dist/pep-p.es.js +++ b/dist/pep-p.es.js @@ -49,7 +49,7 @@ define('pep-p', { // Create a copy of the children and text before we start modifying it. this.originalChildNodes = Array.from(this.childNodes).map(node => node.cloneNode(true)); this.originalTextContent = this.textContent; - // this.setAttribute('tooltip', this.originalTextContent.trim()); + this.setAttribute('tooltip', this.originalTextContent.trim()); this.trimTextContent(); }, disconnected() { @@ -80,6 +80,10 @@ define('pep-p', { this.restoreChildren(); this.trimTextContent(); + if (!this.didTrim) { + this.removeAttribute('tooltip'); + } + if (this.didTrim) { this.setAttribute('tooltip', this.originalTextContent.trim()); }