Results 1 to 4 of 4

Thread: [6.6.0 Classic] Datefield first click causes page to jump to top in iframe (IE11)

    You found a bug! We've classified it as EXTJS-27779 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2011
    Location
    Betelgeuse VII
    Posts
    101

    Default [6.6.0 Classic] Datefield first click causes page to jump to top in iframe (IE11)

    Hello,

    I have run across an issue with IE11 when clicking on a date field in an iframe. When I the first click of the date field the page will scroll (or jump) to the top of the page. If I click on the date field a second time the page no longer jumps and stays at it's current position. This appears to only affect IE 11. When the page is not in an iframe there is no issue.

    To reproduce this have a page with an iframe:

    HTML Code:
    <!DOCTYPE html>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <html>
    <body>
    <iframe id="frame" width="800" height="2000" src="Test.html"></iframe>
    </body>
    </html>
    Then in the page loaded by the iframe include a form panel containing a date field with enough height to ensure page scrolls:

    Code:
     
    Ext.onReady(function () {
    
      var DateField = Ext.create('Ext.form.field.Date', { 
          fieldLabel: 'Date',
          format: 'm/d/Y',
          maxWidth: 350
       });
    
       var form = Ext.create('Ext.form.Panel', {
          title: 'Simple Form',
          scrollable: true,
            bodyPadding: 5,
            items: [
              {
                xtype: 'tbspacer',
                height: 700
              },
              DateField,
              {
                xtype: 'tbspacer',
                height: 700
              }
            ],
       });
    
    
        Ext.create('Ext.container.Viewport', {
            layout: 'fit',
            renderTo: Ext.getBody(),
            items: [form]
        });
    });
    If anyone knows of a workaround for this it would be much appreciated.

    Thanks.

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006

    Default

    Thank you for bringing this to our attention. I have shared this issue with the support team. They will look into it as soon as possible and get back to you if they are aware of a workaround. Thank you for your patience.

    Michele

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2011
    Location
    Betelgeuse VII
    Posts
    101

    Default

    IE11 appeared to be first rendering the calendar at position 0,0 so as a temporary workaround I decided to show it off screen. I overrode the expand function on the Ext.form.field.Picker and changed the line:

    Code:
    picker.show();
    to:

    Code:
    picker.showAt(10000, 10000);
    I haven't seen any side-effects so far and IE11 is not jumping anymore.

  4. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    538

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Replies: 2
    Last Post: 21 Mar 2018, 3:35 AM
  2. Replies: 0
    Last Post: 7 Nov 2017, 4:40 PM
  3. Replies: 0
    Last Post: 18 Jan 2017, 4:54 AM
  4. Replies: 2
    Last Post: 17 Jan 2014, 12:33 AM
  5. Jump to a div (element) in the page
    By paha in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 5 Nov 2007, 3:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •