Skip to content

Blind effect bugfix #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Blind effect bugfix #563

wants to merge 1 commit into from

Conversation

rozwell
Copy link
Contributor

@rozwell rozwell commented Jan 1, 2012

It didn't work well for me, especially when I had absolutely positioned elements.
I did only basic tests but it seems to be working fine now.

@gnarf
Copy link
Member

gnarf commented Jan 5, 2012

Can you give us a reduced test case that shows the bug? I don't see anything wrong with the patch, but I'd like to know why we need it

@rozwell
Copy link
Contributor Author

rozwell commented Jan 5, 2012

Sure thing, here it is (with latest jquery-ui build):

http://rozwell.pl/jquery.blind-test/

And it's source:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Blind effect test</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="http://rozwell.pl/jquery.blind-test/jquery-ui.1.9pre.js"></script>
    <script type="text/javascript">
      $(function(){
        var speed = 1200;
        $("#logo").delay(500)
          .hide("blind", {direction: "left"}, speed)  // works
          .show("blind", {direction: "left"}, speed)  // works
          .hide("blind", {direction: "right"}, speed) // fails
          .show("blind", {direction: "right"}, speed) // fails
          .hide("blind", {direction: "up"}, speed)    // works
          .show("blind", {direction: "up"}, speed)    // works
          .hide("blind", {direction: "down"}, speed)  // fails
          .show("blind", {direction: "down"}, speed)  // fails
        ;
      });
    </script>
    <style type="text/css">
      #container {
        position: absolute;
        top: 100px;
        left: 50%;
        margin: 0 0 0 -400px;
        width: 800px;
        height: 400px;
        background: #bbb;
      }
      #logo {
        position: absolute;
        background: url('http://rozwell.pl/jquery.blind-test/logo.gif') no-repeat center #1c1c1c;
        left: 300px;
        top: 100px;
        width: 235px;
        height: 55px;
      }
      .ui-effects-wrapper {
        background: #f00 !important; /* will not be visible if everything works fine */
        /* uncomment below for failing tests to see what happens with the logo */
        /* overflow: visible !important; */
      }
    </style>
  </head>
  <body>
    <div id="container">
      <div id="logo"></div>
    </div>
  </body>
</html>

@gnarf
Copy link
Member

gnarf commented Jan 5, 2012

Alright, makes sense. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants