View Full Version : Combobox and jQuery and IE - Dropdown Position Offset
dragontree
04-27-2007, 05:14 PM
I was trying to track down a bug in my code locally, but I've isolated it to jQuery and IE. A combobox appears to be offset by several pixels. The attached image is from:
Examples and Demos/Form and ComboBox/Dynamic Forms
The bug is also present in the current API examples...
jack.slocum
04-30-2007, 08:30 AM
Your will have to post this to the jquery dimensions plugin. It provides those coordinates when using jQuery.
jheid
05-09-2007, 03:30 AM
Is this the same as the serious bug when migrating from 1.0 to 1.0.1 with jquery?
Just open http://extjs.com/deploy/ext/examples/grid/edit-grid.html, select the jquery adapter and scroll down in the table. Now click on "Light"-column und you will have the same offset as the scroll offset.
Or have I missed another bug report?
JOERN
dragontree
05-09-2007, 08:33 AM
Is this the same as the serious bug when migrating from 1.0 to 1.0.1 with jquery?
Just open http://extjs.com/deploy/ext/examples/grid/edit-grid.html, select the jquery adapter and scroll down in the table. Now click on "Light"-column und you will have the same offset as the scroll offset.
Or have I missed another bug report?
JOERN
I can't duplicate the test case that you describe with IE6 and jQuery . We must be talking about different bugs..
jack.slocum
05-09-2007, 12:31 PM
Offsets are calculated differently based on the container of the element. Somewhere, the jQuery plugin is missing part of the calculation. To be honest, I am not sure what it is missing.
jheid
05-09-2007, 01:42 PM
Offsets are calculated differently based on the container of the element. Somewhere, the jQuery plugin is missing part of the calculation. To be honest, I am not sure what it is missing.
Yes, but the example (and my application) works perfectly with 1.0 and the problem occured with 1.0.1 (same jquery.js and dimensions.js).
Could you see the problem with the demo (I tested it with IE 7 and FF 2.0.x)?
jack.slocum
05-09-2007, 07:46 PM
Try adding this somewhere after Ext:
Ext.lib.Dom.getXY = function(){
var o = jQuery(el).offset();
return [o.left, o.top];
}
dragontree
05-09-2007, 11:38 PM
Try adding this somewhere after Ext:
Ext.lib.Dom.getXY = function(){
var o = jQuery(el).offset();
return [o.left, o.top];
}
IE error: 'el' is undefined
tryanDLS
05-10-2007, 01:18 PM
That should be
Ext.lib.Dom.getXY = function(el){
var o = jQuery(el).offset();
return [o.left, o.top];
}\
jheid
05-10-2007, 03:55 PM
Try adding this somewhere after Ext:
Ext.lib.Dom.getXY = function(el){
var o = jQuery(el).offset();
return [o.left, o.top];
}
Thanks, it works.
dragontree
05-10-2007, 05:43 PM
That should be
Ext.lib.Dom.getXY = function(el){
var o = jQuery(el).offset();
return [o.left, o.top];
}\
Using Ext 1.0.1a, I still have the same offset dropdown.. :(
tryanDLS
05-10-2007, 05:48 PM
How could it be in 1.0.1a when he just came up with a fix today?
dragontree
05-11-2007, 01:07 AM
How could it be in 1.0.1a when he just came up with a fix today?
It's not in 1.0.1a. I was stating my local test environment version of Ext...
jheid
05-12-2007, 10:59 AM
It's not in 1.0.1a. I was stating my local test environment version of Ext...
Do you still have the problem?
If you do, I will tell what I have done to solve it:
I'm using the latest JQuery.js and the dimension.js from 2007-04-19 (search for it in the forum if this is the only difference). The last lines in the "Ext.onReady (function () {" function are the lines Animal has posted. This works for me perfectly.
dragontree
05-12-2007, 11:46 AM
Yes, I still have the issue.
I'm also using the latest jQuery, but I couldn't find the dimension.js in any thread that you mentioned. Can you point me to the title of the thread?
jheid
05-12-2007, 01:46 PM
Hhm, I've downloaded it from here: http://jqueryjs.googlecode.com/svn/trunk/plugins/dimensions/
brandon.aaron
05-13-2007, 07:15 PM
You can also download dimensions from here: http://jquery.com/plugins/project/dimensions
I couldn't tell from this thread if there was actually a bug in Dimensions or not. Let me know if there is and I'll get it taken care of.
dragontree
05-14-2007, 09:51 AM
You can also download dimensions from here: http://jquery.com/plugins/project/dimensions
I couldn't tell from this thread if there was actually a bug in Dimensions or not. Let me know if there is and I'll get it taken care of.
I believe it's a bug with jQuery Dimensions plugin. Using the latest version of the plugin, extJs 1.0.1a and IE6, I still have the bug (as noted in the original post and image).
Take a look at the API examples with a dropdown:
http://www.extjs.com/deploy/ext/docs/index.html
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.