It's hard to read Brice's minimalist (elegant and light) code style... but I
suspect the reason it's breaking is on line 27:
var f=function(w,t){return parseInt(w.css(t)) || 0};
If w.css returns undefined then your value will be 0 initially. If w.css is
a percentage, then it will think 10% is really 10px. In either case you're
likely to see a jump.
(Note: I haven't confirmed this as the culprit, but it seems the most likely
suspect at this time.)
It will require a little extra work to convert the % into a px value before
being used. Essentially you'll need to determine the object's x/y
coordinates instead of reading in the style.
Brian.
On 7/3/07, rolfsf <[EMAIL PROTECTED]> wrote:
hmmm... in your case, you're actually using absolute positioning with
pixels
instead of %, which is what "fixes" the problem for me. Head scratcher...
Glen Lipka wrote:
>
> The picture on the top right of my blog does the exact same thing.
> Im very interested to know how to fix..
>
> Glen
> http://www.commadot.com
>
>
> On 7/3/07, rolfsf <[EMAIL PROTECTED] > wrote:
>>
>>
>>
>> I've posted a stripped-down example page here:
>>
>> http://www.monkeypuzzle.net/testfiles/jquery/jqDnR_drag_bug/
>>
>> Firefox works fine. In IE6, IE7, or Safari 2 (mac), the modal window
will
>> jump partially off-screen if you try to drag the window. If I set top
and
>> left to pixels instead of %, this jump doesn't happen. Does anyone know
>> why?
>>
>> Thanks
>> -------------------------
>>
>>
>> rolfsf wrote:
>> >
>> > I encountered a bug when implementing dragging in a jqModal window
via
>> > jqDnR. In IE6, IE7 and Safari 2, the modal window would initially
jump
>> to
>> > the left, partially off screen when starting to drag. This would only
>> > happen the first time I tried to drag.
>> >
>> > After tearing my page down to the basics, I appears to be related to
>> the
>> > positioning using percentages (e.g. top: 17%;)
>> >
>> > I went back to the jqModal download & demo page, and sure enough, the
>> bug
>> > is there. Go to example 3A
>> > http://dev.iceburg.net/jquery/jqModal/
>> >
>> > try to drag the window
>> >
>> > if I change the positioning to use pixels instead of percentages, it
>> seems
>> > to go away... but that's not ideal for centering.
>> >
>> > Anyone have a better fix?
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/jqDnR-%2B-jqModal----dragging-causes-jump-in-IE---Safari-tf4014648s15494.html#a11417206
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/jqDnR-%2B-jqModal----dragging-causes-jump-in-IE---Safari-tf4014648s15494.html#a11417458
Sent from the JQuery mailing list archive at Nabble.com.