Cant Select All on Input Text Boxes on Sortable Table Headers

Cant Select All on Input Text Boxes on Sortable Table Headers

kzapkzap Posts: 2Questions: 1Answers: 0

From https://github.com/DataTables/DataTables/issues/830

In Chrome 51.0.2704.63 (64-bit) on OSX (doesnt happen on firefox)

The input boxes inside a table header which is sortable dont allow Select All, or CMD+A, or Edit Menu -> Select All.

If you put the input box in header that is not sortable or outside the TH tag, it works fine.

To replicate edit the html one of the sortable TH tags on this page:
https://datatables.net/examples/basic_init/table_sorting.html

From:

<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1" aria-label="Name: activate to sort column ascending" style="width: 137px;">Name</th>

to

<th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1" aria-label="Name: activate to sort column ascending" style="width: 137px;">Name
<input type="text" name="test" value="test" />
</th>

Now try to select all the word test or anything inside the text box. Not a show stopping bug, just annoying and couldnt figure out how to fix it from the javascript code :)

Answers

  • kzapkzap Posts: 2Questions: 1Answers: 0

    Also even if I put a e.stopPropogation() on the event handler for the input box as suggested, I still cant CMD+A or select all.

    All that prevents is the Sorting from happening when I click the input box.

This discussion has been closed.