Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3236176
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:35:30+00:00 2026-05-17T17:35:30+00:00

I have a table whose body I’ve made sortable using jQuery UI’s Sortable function.

  • 0

I have a table whose body I’ve made sortable using jQuery UI’s Sortable function. Within this sortable table, I have a textarea which allows the user to enter comments about a given table entry.

<table id="status">
    <thead>
        <tr>
            <th>Name</th>
            <th>Comment</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="dragHandle">Jason</td>
            <td><textarea class="commentBox"></textarea></td>
        </tr>
    </tbody>
</table>

And the javascript to make the table sortable (with a helper function for making tables sortable I found online)

// Return a helper with preserved width of cells
var fixHelper = function(e, ui) {
    ui.children().each(function() {
        $(this).width($(this).width());
    });

    return ui;
};

$("#status").sortable({
    helper: fixHelper,
    axis: 'y',
    handle: '.dragHandle'
}).disableSelection();

Text entry into this textarea works fine, however when I try to select text within the textarea, nothing happens. Even using Shift+Arrow Keys does not behave as I would expect.

How do I make a textarea’s text selectable while still making the entire table sortable?

Already Attempted:

  • Doing a sortable “destroy” on the table when a textarea gets focus to try and temporarily allow selectability, but even after the destroy, text selection is still wonky.

  • Setting the ‘handle’ property of the sortable to make only the Name field sortable

  • Setting the ‘disable’ property of the sortable to disable when initiated from textareas

  • Capturing the mousedown/mouseup events in the textarea (or a div containing the textarea) and calling event.stopPropagation()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:35:31+00:00Added an answer on May 17, 2026 at 5:35 pm

    What’s the reasoning for using disableSelection? That is the reason your textArea is not getting focus.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like some help with the following jQuery code if possible... $(document).ready(function() { $('table.sortable').each(function()
I have a table whose header looks like this (I've simplified it): id, a1,
I have an Events table whose goal is to store actions done by web
I have a Tags table whose schema consists of only ID and Name (unique).
I have a simple table in MySql whose raison-d'être is to store logs. The
Imagine I have table like this: id:Product:shop_id 1:Basketball:41 2:Football:41 3:Rocket:45 4:Car:86 5:Plane:86 Now, this
I have a table in one of my databases which is a queue of
I have a table whose size I'd like to keep down, and one of
i have a table whose structure is <table> <tr> <td> <input type=text id=field_1 />
I have a PROPERTY table whose primary key is defined as (REF_1_ID, PROPERTY_ID, PROPERTY_IDX)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.