#883 closed defect (fixed)
[patch] Opera: resizing fails in test_SplitContainer.html
Reported by: | Owned by: | bill | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Events | Version: | 0.3 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
tests/widget/test_SplitContainer.html
Drag separators and nothing happens
Change History (10)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
My suggestion is to fix in event.browser.fixEvent(), since there is already code to do the same for IE. Or just fix it in SplitContainer
the same way. Suggested patch follows:
[email protected]:~/devel/ajax/dojo$ svn diff src/event/browser.js Index: src/event/browser.js =================================================================== --- src/event/browser.js (revision 4242) +++ src/event/browser.js (working copy) @@ -230,11 +230,12 @@ } } + if(!evt.layerX && evt.offsetX) { evt.layerX = evt.offsetX; } + if(!evt.layerY && evt.offsetY) { evt.layerY = evt.offsetY; } + if(dojo.render.html.ie){ if(!evt.target){ evt.target = evt.srcElement; } if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); } - if(!evt.layerX){ evt.layerX = evt.offsetX; } - if(!evt.layerY){ evt.layerY = evt.offsetY; } // FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module if(!evt.pageX){ evt.pageX = evt.clientX + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0) } if(!evt.pageY){ evt.pageY = evt.clientY + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0) } [email protected]:~/devel/ajax/dojo$
comment:3 Changed 16 years ago by
Cc: | [email protected]… added |
---|
Unfortunately, this makes things much worse on Opera. With this change, the layout is completely messed up. The sliders are all the way up and to the left respectively in the two boxes, overlaying each other and still unable to be dragged.
comment:4 Changed 16 years ago by
Adam,
Clear cookies and that problem will go away. That container uses cookies to save slider position, but the cookies end up with bogus values and screw things up thereafter.
I don't suggest that fix is pixel perfect though. It looked to me like it offsetX matches layerX 1 to 1 only as long as the element has no padding/margins. Some adjustment probably needs to happen otherwise, but I don't have time (or interest) to delve in that deep at the moment.
Cheers, Stephen
comment:6 Changed 16 years ago by
Owner: | changed from anonymous to bill |
---|
comment:7 Changed 16 years ago by
Component: | General → Events |
---|---|
Milestone: | → 0.4 |
Summary: | Opera: resizing fails in test_SplitContainer.html → [patch] Opera: resizing fails in test_SplitContainer.html |
has a patch, bumping to 0.4 as this should be an easy merge
comment:9 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5631]) Fixes #173 - just clicking a splitter makes it move 1px Fixes #391 - splitContainer panels sometimes have undesired scrollbars Fixes #883 - opera: resizing fails in test_SplitContainer.html
Patch from Doug (IBM, CCLA on file)
Also, I changed activeResize to be true/false rather than 0/1. Because we're not programming in C anymore. :-)
SplitContainer?.beginSizing() is using layerX and layerY properties of the mousedown event which are not supported in Opera (http://www.quirksmode.org/dom/w3c_events.html#mousepos).