Ticket #3037 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Safari 3.1.1 $jq.remove() losing select options

Reported by: lenny@… Owned by: paul
Priority: critical Milestone: 1.5.2
Component: ui.core Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

Below pasted from mailing list:

 http://groups.google.com/group/jquery-ui/browse_thread/thread/7299825dd298bfcb#

I've run into what looks to be a bug with Safari 3.1.1/jquery-ui-1.5. I have a select menu with options that is removed from the DOM and later re-inserted. If ui.core.js has been included, then the select menu loses one of its options each time it is removed. Below is some HTML that demonstrates the problem.

-lenny

<html>
<head>
<script type="text/javascript" src="jquery-1.2.6.js"></script>

<!--
  - With the ui.core.js inclusion commented, the select menu will
properly
  - include NORMAL and URGENT when you hit the 'Insert'.
  - Once you include ui.core.js, each time $target is
  - removed it loses one option from the select menu in Safari 3.1.1

<script type="text/javascript" src="ui.core.js"></script>
-->

<script type="text/javascript">

  $(document).ready(function() {
      $target = $('#target').remove();

      $('#insert').click(function() {
        $('#dest').append($target);
        $target.show();
      });

      $('#remove').click(function() {
        $target.remove();
      });

  });
</script>
</head>
<body>

  <div id="target" style="display: none;">

      <select name="task_priority" id="task_priority">
        <option value="NORMAL">Normal</option>
        <option value="URGENT">Urgent</option>
      </select>

    </div>
  <div>

  <form>
    <div id="dest">
       <a id="insert" href="javascript: void(0);">Insert</a>
       <a id="remove" href="javascript: void(0);">Remove</a>
       <br/><br/>
    </div>
  </form>

</body>
</html>

Change History

comment:1 Changed 6 years ago by rdworth

  • Priority changed from major to critical

comment:2 Changed 6 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r399.

comment:3 Changed 6 years ago by paul

  • Milestone set to 1.5.2

comment:4 Changed 6 years ago by rdworth

  • Milestone changed from 1.5.2 to 1.6b

comment:5 Changed 6 years ago by rdworth

  • Milestone changed from 1.6b to 1.5.2
Note: See TracTickets for help on using tickets.