Impossible to select CKEditor field inside a Paragraph with Gin theme
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3593495. -->
Reported by: [jeremycrozier](https://www.drupal.org/user/3869157)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When using the Gin admin theme (5.0.14), it is impossible to properly select or interact with a CKEditor field inside a Paragraph item.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>1. Install Drupal with the Gin admin theme enabled.<br>
2. Install and enable the required modules:<br>
* Paragraphs<br>
* CKEditor 5<br>
* Gin<br>
3. Create a Paragraph type containing a formatted text field using CKEditor.<br>
4. Add this Paragraph field to a content type.<br>
5. Edit or create a node using this content type.<br>
6. Add a Paragraph item.<br>
7. Try to click/select text inside the CKEditor field.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>The issue seems related to the tabledrag behavior. The mousedown, touchstart, and pointerdown events are attached to the closest table row using: </p>
<p><code>/gin/js/overrides/tabledrag.js</code></p>
<pre>$handle.closest('tr')<br> .off('mousedown.tabledrag touchstart.tabledrag pointerdown.tabledrag')<br> .on('mousedown.tabledrag touchstart.tabledrag pointerdown.tabledrag', (event) => {<br><br> const $target = $(event.target);<br><br> if ($target.is('input, select, textarea, button, a, label, .ck-content') || $target.closest('.tabledrag-handle').length) {<br> return;<br> }<br> });</pre><p>The problem is that CKEditor 5 uses .ck-content or .ck-editor__editable as the editable area, but this selector is not excluded from the tabledrag behavior.</p>
<p>As a result, clicking inside the CKEditor content area can trigger tabledrag-related behavior instead of allowing normal text selection/editing.</p>
<p>Thank you for the excellent work on the Gin theme. It has become an essential part of the Drupal administration experience and greatly improves usability for content editors and developers alike.</p>
<p>Thanks again for your time and for maintaining such a valuable project.</p>
issue