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 546795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:54:16+00:00 2026-05-13T10:54:16+00:00

I’m creating a small page where users can modify the name of categories and

  • 0

I’m creating a small page where users can modify the name of categories and items with the help of jeditable/jquery.

The script works but acts a little strangely in Firefox. If I double click on my editable span it will be replaced with the input field. It will then disappear if I focus on some other element EXCEPT another editable span. I should also note that the cursor disappears when it first enters the input box.

If I want the input field to change I must put focus on it again and then click somewhere else.

It works fine in IE.

Here are my jquery definitions:

$(document).ready(function(){
    //this will be executed once the dom is loaded

    $(".categories").sortable({
                                                    connectWith: ".categories",
                                                    dropOnEmpty: true,
                                                    tolerance: "pointer",
                                                    cancel: ".sections"
                                                    }).disableSelection();

    $(".sections").sortable({
                                                    connectWith: ".sections",
                                                    items: "li:not(.empty)",
                                                    dropOnEmpty: true
                                                    }).disableSelection();                              

    $(".section_edit").editable("serve_edit_section_request.php", { 
      tooltip: "Click to edit...",
      select: true,
      style: "inherit",
      cssclass: "edit_input_box",
      event: "dblclick",
      id: this.id,
      name: "section_name",
      onblur: "cancel"  
  })

  $(".category_edit").editable("serve_edit_category_request.php", { 
      tooltip: "Click to edit...",
      select: true,
      style: "inherit",
      cssclass: "edit_input_box",
      event: "dblclick",
      id: this.id,
      name: "category_name",
      onblur: "cancel"  
  })

});

And my list:

<ul class='categories'>
  <li id='1' class='category'><span id='edit_1' class='category_edit'>Category 1</span>
    <ul id='cat_1' class='sections'>    
      <li class='empty'></li>   
      <li id='20' class='section'><span id='edit_20' class='section_edit'>My Section 1</span></li>
    </ul>
  </li>
  <li id='2' class='category'><span id='edit_2' class='category_edit'>Category 2</span>
    <ul id='cat_2' class='sections'>    
      <li class='empty'></li>   
      <li id='21' class='section'><span id='edit_21' class='section_edit'>My Section 2</span></li>  
      <li id='22' class='section'><span id='edit_22' class='section_edit'>My Section 3</span></li>
    </ul>
  </li>
  <li id='3' class='category'><span id='edit_3' class='category_edit'>Category 3</span>
    <ul id='cat_3' class='sections'>    
      <li class='empty'></li>   
      <li id='23' class='section'><span id='edit_23' class='section_edit'>My Section 4</span></li>
    </ul>
  </li>
  <li id='4' class='category'><span id='edit_4' class='category_edit'>Category 4</span>
    <ul id='cat_4' class='sections'>    
      <li class='empty'></li>   
      <li id='809' class='section'><span id='edit_809' class='section_edit'>My Section 5</span></li>
    </ul>
  </li>
</ul>

(Excuse the bad tabbing of the jquery stuff, I don’t understand why it’s showing up sporadically)

Thanks for any help! 🙂

  • 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-13T10:54:17+00:00Added an answer on May 13, 2026 at 10:54 am

    I had this exact same problem:

    The problem is caused by disableSelection(). The common use of sortable() would not use textareas, and thus most people would not discover the following subtlety:

    disableSelection() uses a CSS trait in FireFox, and thus all the effects are felt in all the descendants of whatever you applied the disableSelection() to. Since you only want to effect the direct children (just as sortable() acts only on the direct children) you should do this instead:

    $(".categories").sortable({
        connectWith: ".categories",
        dropOnEmpty: true,
        tolerance: "pointer",
        cancel: ".sections"
    });
    $(".categories > *").disableSelection();
    

    OR

    $(".categories").sortable({
        connectWith: ".categories",
        dropOnEmpty: true,
        tolerance: "pointer",
        cancel: ".sections"
    }).children().disableSelection();
    

    (From the JQuery Docs: “Also note: while parents() will look at all ancestors, children() will only consider immediate child elements.”)

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker

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.