Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7683 (reopened defect)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Element.getDimensions issue breaks BlindDown in DL

Reported by: handcoding Assigned to: madrobby
Priority: high Milestone: 2.x
Component: Prototype Version: edge
Severity: normal Keywords: getDimensions ready discuss 1.6
Cc: savetheclocktower, madrobby

Description

It looks like BlindDown is a bit jumpy on definition lists but not with divs (using the same text). And, yes, I've set all the margins and padding to zero ;). To be sure, this only occurs in Firefox and not in IE. (I'm using Firefox 2.x.)

I've created a testcase here: http://www.handcoding.com/documents/testing/blinddown-test/blinddown-test.html

The steps to reproduce are listed on the page, but the gist of it is that I've assigned 'click' event handlers to elements that trigger BlindDown on either a div or a dd element (as part of a definition list). After clicking on those, respectively, the div slides down smoothly but the dd element appears to come in suddenly at the end.

Attachments

7683.diff (1.7 kB) - added by savetheclocktower on 03/11/07 22:35:32.
Makes the test page work, but may need more testing
7683_tests.2.diff (1.8 kB) - added by savetheclocktower on 03/12/07 19:31:31.
Unit test
7683_tests.diff (1.8 kB) - added by savetheclocktower on 03/12/07 19:32:34.
Unit tests (use this one; disregard the duplicate)

Change History

02/28/07 23:08:50 changed by handcoding

One of my coworkers did some extra data testing and discovered that Firefox wasn't the only browser affected:

Browsers that exhibit the shifting/jumping

* Firefox * Safari * Opera * IE 7

Browsers that had a smooth slide down:

* IE 5.5 * IE 6

03/11/07 22:35:32 changed by savetheclocktower

  • attachment 7683.diff added.

Makes the test page work, but may need more testing

03/11/07 22:37:11 changed by savetheclocktower

  • cc set to savetheclocktower.
  • keywords set to getDimensions.
  • component changed from script.aculo.us to Prototype.
  • owner changed from madrobby to sam.

Turns out this is an issue with Element.getDimensions, so I'm moving this to Prototype. I'll add a unit test once I feel a bit more responsible. IMO, we should really push this into 1.5.1 final.

03/12/07 19:31:31 changed by savetheclocktower

  • attachment 7683_tests.2.diff added.

Unit test

03/12/07 19:32:34 changed by savetheclocktower

  • attachment 7683_tests.diff added.

Unit tests (use this one; disregard the duplicate)

03/12/07 19:47:39 changed by madrobby

  • cc changed from savetheclocktower to savetheclocktower, madrobby.

03/12/07 19:49:16 changed by savetheclocktower

  • keywords changed from getDimensions to getDimensions ready discuss 1.5.1.

03/20/07 12:31:46 changed by mislav

  • owner changed from sam to madrobby.
  • priority changed from normal to high.
  • summary changed from In Firefox, BlindDown appears suddenly at the end with definition lists but not with divs to [PATCH] Element.getDimensions issue breaks BlindDown in DL.

03/27/07 18:05:22 changed by madrobby

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [7683].

03/29/07 22:06:59 changed by handcoding

  • status changed from closed to reopened.
  • resolution deleted.

It looks like this fix has brought about a regression in BlindDown within IE. Here's a new testcase based off the Prototype SVN trunk (as of 2007-03-29 @ 4:30pm CDT): http://www.handcoding.com/documents/testing/getdimensions-test/getdimensions-test.html

In short, when descending a dd element, IE significantly over-extends the area and then corrects itself right at the end.

(Firefox & Safari are working fine, btw -- it's just IE that's affected this time.)

04/05/07 12:53:03 changed by madrobby

Rolled out of the patch as this breaks certain effects scenarios. I don't have a test at hand but will look into it.

04/05/07 12:54:12 changed by madrobby

Please note this doesn't affect IE only, I see problems here on Safari, too. I suspect Position.absolutize has the tendency to break things...

06/18/07 22:58:34 changed by savetheclocktower

  • keywords changed from getDimensions ready discuss 1.5.1 to getDimensions ready discuss 1.6.

Thomas, please give some scenarios where this fails so that we can address them. I want to make sure this is fixed for 1.6.