1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    0
    nishimura is on a distinguished road

      0  

    Question Problem with scroll to top in Ext.panel with input type="text". Is it a bug?

    Problem with scroll to top in Ext.panel with input type="text". Is it a bug?


    Hi.

    I have a page with input tag (input type="text" or "password") and a toolbar by Ext.toolbar.
    It works well, but when I see the page by iPad, there is a problem.

    1) Tap the textfield, and the keyboard appears in the screen.
    2) Tap the HTML body (not on the input form)

    After 2nd process, the page was force to scroll down and the input form disappears from the screen!!

    In my opinion, this situation is caused by "scrollToTop" method in Ext.Viewport class
    especially "document.body.scrollTop = document.boy.scrollHeight" in the method.

    Why does it cause?
    Is it a bug in sencha touch?

    This is a very simple example.

    Code:
    <!doctype html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" href="resources/css/sencha-touch-debug.css" type="text/css">
        <script type="text/javascript" src="sencha-touch-debug.js"></script>
        <script language="JavaScript" type="text/javascript">
    Ext.setup({
        onReady: function() {
            var mainBar = new Ext.Toolbar({
                renderTo: 'toolbar',
                ui: 'dark',
                dock: 'top',
                title: 'TOOLBAR'
            });
        }
    });    
    </script>
    </head>
    <body>
    <div id="toolbar"></div>
    <form name="mailForm" action="./index.html" method="post">
    <input name="mail" type="text" placeholder="address">
    </form>
    </body>
    </html>
    Help me please...
    thank you.

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    0
    nishimura is on a distinguished road

      0  

    Lightbulb I found the solution!!

    I found the solution!!


    I found the solution of the problem yesterday!
    The problem was caused because of "Ext.currentlyFocusedField".
    So I set Ext.currentlyFocusedField up as 'true' when input form was focused
    and set it up as 'false' when input form was blurred.
    Code:
    <input name="mail" type="text" placeholder="address" onfocus="Ext.currentlyFocusedField=true;" onblur="Ext.currentlyFocusedField=false;">
    Thank you.



    [/CODE]

Similar Threads

  1. Ext.Button vs <input type="submit" name>. Need POST variable
    By mikhailt in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 10 Dec 2010, 8:09 AM
  2. Replies: 2
    Last Post: 31 Aug 2010, 4:28 PM
  3. do ext js have input type="image"???
    By koko2589 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Jul 2010, 6:11 AM
  4. input type="readonly", Ext issue.
    By ewkoob in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 16 Apr 2008, 9:16 AM
  5. Form: input type="hidden"
    By vbert in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 Apr 2007, 4:35 AM

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar