diff --git a/edit/edit.css b/edit/edit.css index 4df2993d..11c1c08b 100644 --- a/edit/edit.css +++ b/edit/edit.css @@ -404,6 +404,12 @@ html:not(.usercss) .applies-to li:last-child .add-applies-to { margin-left: -20px; margin-top: -1px; } +.regexp-report-note { + color: #999; + position: absolute; + margin: 0 0.5rem 0 0; + hyphens: auto; +} /************ help popup ************/ #help-popup { top: 3rem; diff --git a/edit/regexp-tester.js b/edit/regexp-tester.js index 4c5e63ff..8da9854c 100644 --- a/edit/regexp-tester.js +++ b/edit/regexp-tester.js @@ -160,13 +160,15 @@ var regExpTester = (() => { } } } - report.appendChild( - $create('p.regexp-report-note', - t('styleRegexpTestNote') - .split(/(\\+)/) - .map(s => (s.startsWith('\\') ? $create('code', s) : s)))); showHelp(t('styleRegexpTestTitle'), report); + const note = $create('p.regexp-report-note', + t('styleRegexpTestNote') + .split(/(\\+)/) + .map(s => (s.startsWith('\\') ? $create('code', s) : s))); + report.appendChild(note); + report.style.paddingBottom = note.offsetHeight + 'px'; + report.onclick = event => { const target = event.target.closest('a, .regexp-report div'); if (target) {