Viewport moves after resizing browser (only in Chrome)

  1. #1

    Viewport moves after resizing browser (only in Chrome)

    Hi, I have a problem with reducing the browser window when I am reducing the browser window, and select an item and hold the mouse button while moving in the right viewport moves to the left. This only happens in chrome. In Mozilla and IE do not have this error. Details on the pictures.
    Attached Thumbnails Click image for larger version. 

Name:	after_resize.png 
Views:	49 
Size:	75.3 KB 
ID:	5937   Click image for larger version. 

Name:	before_resize.jpg 
Views:	50 
Size:	77.6 KB 
ID:	5938  
  2. #2
    Please post a sample reproduces the issue
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    File app.aspx

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="app.aspx.cs" Inherits="HelpDeskLayout.app" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
       
    <head runat="server">
        <title></title>
        <meta http-equiv="content-type" content="text/html" charset="utf-8" />
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
        <ext:Viewport runat="server" Layout="Border">
            <Items>
                <ext:Panel runat="server" ID="panelAppHeader" Region="North" Height="50"
                    Html="<img src='img/LogoHelpDesk.png' />" BodyStyle="background-color: #dedddd;">
                </ext:Panel>
                    
                <ext:TabPanel runat="server" ID="tabApp" Region="Center"  >
                    <Items>
                        <ext:Panel runat="server" ID="panelAdministracja" Title="Administracja" Layout="FitLayout" >
                            <Items>
                                <ext:UserControlLoader runat="server" Path="Kontrolki/Administracja/PanelAdministracja.ascx"></ext:UserControlLoader>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:TabPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    File PanelAdministracja.ascx

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PanelAdministracja.ascx.cs" Inherits="HelpDeskLayout.Kontrolki.Administracja.PanelAdministracja" %>
    
    <ext:Panel runat="server" ID="panelUserAdministracja" Border="false">
        <LayoutConfig>
            <ext:HBoxLayoutConfig Align="Stretch"   />
        </LayoutConfig>
        <TopBar >
            <ext:Toolbar runat="server">
                <Items>
                    <ext:SplitButton runat="server" Text="Szybkie działania"></ext:SplitButton>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <Items>
            <ext:Panel runat="server" BodyPadding="10" Border="false" Height="600" Width="250" >
                <Items>
                    <ext:Panel runat="server" Title="Opcje" Layout="AccordionLayout" Height="400">
                        <Items>
                            <ext:Panel runat="server" Title="Helpdesk" BodyPadding="5"  >
                                <Items>
                                    <ext:ButtonGroup runat="server" Columns="1">
                                        <LayoutConfig>
                                            <ext:VBoxLayoutConfig Align="Stretch"   />
                                        </LayoutConfig>
                                        <Items>   
                                            <ext:Button runat="server" Text="Stan" TextAlign="Left" ToggleGroup="Group1" Flex="1" OnDirectClick="btnStan_DirectClick">
                                                <Listeners>
                                                    <Click Handler="function(){
                                                        this.toggle(true);
                                                        }"></Click>
                                                </Listeners>
                                            </ext:Button>      
                                        </Items>
                                    </ext:ButtonGroup>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Panel>
            <ext:Panel runat="server" ID="panelAdministracjaKategoria" BodyPadding="10" Border="false"  Layout="FitLayout" Flex="1">
            </ext:Panel>
        </Items>
    </ext:Panel>
    File PanelAdministracja.ascx.cs

    public partial class PanelAdministracja : System.Web.UI.UserControl
        {
            UserControl currentUC;
    
            private void LoadUserControl(string num,string nazwa, bool update = false)
            {
                
               if (update && currentUC != null)
                {
                   
                    Ext.Net.Utilities.ControlUtils.FindControls<AbstractComponent>(this.panelAdministracjaKategoria ).ForEach(c => { 
                        if(!c.IsLazy)
                        {
                            c.Destroy();
                        }
                    });
                    this.panelAdministracjaKategoria.ContentControls.Clear();
                }
    
                currentUC = (UserControl)this.LoadControl(nazwa);
                currentUC.ID = "UC" + num;
                this.panelAdministracjaKategoria.ContentControls.Add(currentUC); 
    
                if (update)
                {
                    //currentUC.Text = num;
    
                    this.panelAdministracjaKategoria.UpdateContent();
                }
            }
    
            protected void Page_Load(object sender, EventArgs e)
            {
    
            }
    
            protected void btnStan_DirectClick(object sender, DirectEventArgs e)
            {
                this.LoadUserControl("StanAdm1","Kontrolki/StanAdm/StanAdm.ascx", true);
            }
        }
    File StanAdm.ascx

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StanAdm.ascx.cs" Inherits="HelpDeskLayout.Kontrolki.Administracja.Kontrolki.StanAdm.StanAdm" %>
    
    <script type="text/javascript">
        MyApp = {
            StanDodaj: function (grid, form) {
                grid.hide();
                form.show();
            }
        }
    </script>
    
    <ext:GridPanel ID="GridPanelAdministracjaStan" runat="server" Title="Stan" Flex="1" Layout="FitLayout" >
        <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="Button1" runat="server" Text="Dodaj"  Icon="Add" Handler="MyApp.StanDodaj(#{GridPanelAdministracjaStan},#{panelFormPanelStanDodaj} )"/>
                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                    <ext:Button ID="Button2" runat="server" Text="Usuń" Icon="Delete" />                    
                </Items>
            </ext:Toolbar>
        </TopBar>
        <Store>
            <ext:Store runat="server" ID="storeGridAdministracjaStan" >
                <Model>
                    <ext:Model ID="Model1" runat="server" IDProperty="StanID" Name="StanModel">
                        <Fields>
                            <ext:ModelField Name="StanID" Type="Int"></ext:ModelField>
                            <ext:ModelField Name="StanNazwa" Type="String"></ext:ModelField>
                        </Fields>
                    </ext:Model>
                </Model>
                <Proxy>
                    <ext:AjaxProxy Url="StanHandler.ashx">
                        <Reader>      
                            <ext:JsonReader Root="data" />
                        </Reader>
                        <API
                            Update="StanUpdate.ashx"
                            Create="StanUpdate.ashx"
                            Destroy="StanUpdate.ashx"
                            >
                        </API>
                    </ext:AjaxProxy>
                </Proxy>
            </ext:Store>
        </Store>
        <ColumnModel>
            <Columns>
                <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="50" Text="LP."/>
                <ext:Column ID="Column1" runat="server" Text="StanID" DataIndex="StanID" Flex="2" Hidden="true" />
                <ext:Column ID="Column2" runat="server" Text="Nazwa" DataIndex="StanNazwa" Flex="4"  />
            </Columns>
        </ColumnModel>
        <Features>
            <ext:GridFilters Local="true" MenuFilterText="Filtry">
                <Filters>
                    <ext:NumericFilter DataIndex="StanID" EmptyText="Wprowadź numer..." />
                    <ext:StringFilter DataIndex="StanNazwa" />
                </Filters>
            </ext:GridFilters>
        </Features>
        <Listeners>
            <ItemDblClick ></ItemDblClick>
        </Listeners>
    </ext:GridPanel>
        
    <ext:Panel runat="server" ID="panelFormPanelStanDodaj" Border="false" Flex="1" Hidden="true" >
        <Items>
            <ext:FormPanel ID="formPanelStanDodaj" runat="server" Title="Dodawanie stanu" Padding="10" Frame="true" >
                <Items>
                    <ext:FieldSet runat="server" Padding="10">
                        <Items>
                            <ext:TextField runat="server" Name="StanNazwa" FieldLabel="Nazwa stanu" InputWidth="200" AllowBlank="false" MaxLength="100"></ext:TextField>
                            <ext:Hidden runat="server" Name="StanID" ></ext:Hidden>
                        </Items>
                    </ext:FieldSet>
                </Items>
                <Buttons>
                    <ext:Button runat="server" Text="Zapisz" Handler="" ></ext:Button>
                    <ext:Button runat="server" Text="Anuluj" Handler=""></ext:Button>
                </Buttons>
             </ext:FormPanel>
        </Items>
    </ext:Panel>
  4. #4
    Hello!

    Couldn't reproduce. Can you say version of Ext.NET and Google Chrome?
  5. #5
    Hi :-), Ext.net 2.1.1, Chrome 26.0.1410.43 m
    Is the reason for this may be that it is a user control, rather than a basic aspx page ? Because if they will put all the components on one side of the aspx page the error does not occur.
    But I need to use the user controls :-)
    Last edited by rvenix; Apr 02, 2013 at 11:31 AM.
  6. #6
    I've tried with the same configuration and it works fine. Do I miss something?

    I'll try to investigate it more.
  7. #7
    Quote Originally Posted by Baidaly View Post
    I've tried with the same configuration and it works fine. Do I miss something?

    I'll try to investigate it more.
    Hmm, after resize the window browser, do you select grid or form, hold and move mouse to the right outside window browser ?

    I noticed that if I delete Store (in grid) in file StanAdm.ascx this error does not occur. But I need the store ;-)
  8. #8
    Here is a running source part of the application with an error:
    Last edited by geoffrey.mcgill; Apr 03, 2013 at 5:15 PM.
  9. #9
    Quote Originally Posted by rvenix View Post
    Here is a running source part of the application with an error:
    Please just post the simplified code required to reproduce the problem directly in the forum post between [CODE] tags.

    As a policy we do not open .zip files.

    Posting your code in the forums ensures that it is searchable by future users that might be experiencing a similar problem.
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 1
    Last Post: Feb 17, 2013, 9:56 PM
  2. [CLOSED] ViewPort is not resizing inner panel
    By RCM in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 18, 2012, 4:11 PM
  3. [CLOSED] Ext.Net 1.1 issue in Chrome Browser?
    By ryan.kim in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 08, 2011, 10:37 PM
  4. [CLOSED] Bug resizing ViewPort
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 15, 2010, 7:33 PM
  5. [CLOSED] Problem with gridpanel column resizing in firefox and chrome
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 25
    Last Post: Sep 14, 2010, 3:10 PM

Posting Permissions