Bug Tracker

Modify

Ticket #1214 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

.show(...) doesn't always make elements visible

Reported by: arrix Owned by:
Priority: major Milestone: 1.1.3
Component: effects Version: 1.1.2
Keywords: Cc:
Blocking: Blocked by:

Description

1.1.3a in IE/FF/Opera .show(...) doesn't always make elements visible. e.g.

$('#div1').slideDown().hide().show('slow');
$('#div2').fadeIn().hide().show('slow');
$('#div3').hide('slow').show('slow');

Please test with attached file. The elements end up with style="display:none"

Attachments

jq_bug_show.zip Download (19.5 KB) - added by arrix 6 years ago.
fx.diff Download (744 bytes) - added by brandon 6 years ago.
Patch
animations-bug.zip Download (38.4 KB) - added by hobbit 6 years ago.
a test file

Change History

Changed 6 years ago by arrix

comment:1 follow-up: ↓ 2 Changed 6 years ago by brandon

I've attached a patch for this. The logic was reversed causing the animate method to bail out at the wrong time. However, this patch seems to break the fx test suite which I have yet to look into.

comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 6 years ago by brandon

Replying to brandon:

I've attached a patch for this. The logic was reversed causing the animate method to bail out at the wrong time. However, this patch seems to break the fx test suite which I have yet to look into.

I just got totally confused on the logic. The new patch seemingly fixes the problems.

Changed 6 years ago by brandon

Patch

comment:3 in reply to: ↑ 2 Changed 6 years ago by brandon

Replying to brandon:

Replying to brandon:

I've attached a patch for this. The logic was reversed causing the animate method to bail out at the wrong time. However, this patch seems to break the fx test suite which I have yet to look into.

I just got totally confused on the logic. The new patch seemingly fixes the problems.

hmmm... I'm just completely off target on this one. The current attached patch doesn't work for all test cases. If I comment out lines 311-315 in fx.js all test cases work just fine. It seems the enhancement ticket #1051 has caused more harm than good. Another good test-case for this bug can be found in #1234.

BTW... I'm pretty sure this is the bug that is causing the Tabs plugin to fail with 1.1.3a.

Changed 6 years ago by hobbit

a test file

comment:4 Changed 6 years ago by hobbit

I added a test file to the attachments:

<html>
<head>
  <title>Test file</title>
  <style>
    #item {
      display: none;
    }
  </style>
  <script type="text/javascript" src="jquery-1.1.3a.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $("#item").hide(1);
  });
  </script>
</head>
<body>
  <a href="#" onclick="$('#item').show(1);">This doesn't work: show(1)</a><br>
  <a href="#" onclick="$('#item').show(0);">This works: show(0)</a><br><br>

  <a href="#" onclick="$('#item').hide(1);">This doesn't work: hide(1)</a><br>
  <a href="#" onclick="$('#item').hide(0);">This works: hide(0)</a><br><br>

  <div id="item">The animated item</div>
</body></html>

comment:6 Changed 6 years ago by john

Fixed in SVN rev [2129].

comment:7 Changed 6 years ago by john

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.