1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    35
    Vote Rating
    0
    dragontree is on a distinguished road

      0  

    Default Combobox and jQuery and IE - Dropdown Position Offset

    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...
    Attached Images

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    18
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default

    Your will have to post this to the jquery dimensions plugin. It provides those coordinates when using jQuery.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    295
    Vote Rating
    13
    jheid will become famous soon enough

      0  

    Default

    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...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

  4. #4
    Ext User
    Join Date
    Apr 2007
    Posts
    35
    Vote Rating
    0
    dragontree is on a distinguished road

      0  

    Default

    Quote Originally Posted by jheid View Post
    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...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..

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    18
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default

    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.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    295
    Vote Rating
    13
    jheid will become famous soon enough

      0  

    Default

    Quote Originally Posted by jack.slocum View Post
    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)?

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    18
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default

    Try adding this somewhere after Ext:

    Code:
    Ext.lib.Dom.getXY = function(){
            var o = jQuery(el).offset();
            return [o.left,  o.top];
    }
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  8. #8
    Ext User
    Join Date
    Apr 2007
    Posts
    35
    Vote Rating
    0
    dragontree is on a distinguished road

      0  

    Default

    Quote Originally Posted by jack.slocum View Post
    Try adding this somewhere after Ext:

    Code:
    Ext.lib.Dom.getXY = function(){
            var o = jQuery(el).offset();
            return [o.left,  o.top];
    }
    IE error: 'el' is undefined

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
    tryanDLS is on a distinguished road

      0  

    Default

    That should be
    Code:
    Ext.lib.Dom.getXY = function(el){
            var o = jQuery(el).offset();
            return [o.left,  o.top];
    }\

  10. #10
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    295
    Vote Rating
    13
    jheid will become famous soon enough

      0  

    Default

    Quote Originally Posted by jack.slocum View Post
    Try adding this somewhere after Ext:

    Code:
    Ext.lib.Dom.getXY = function(el){
            var o = jQuery(el).offset();
            return [o.left,  o.top];
    }
    Thanks, it works.