1. #1
    Ext User
    Join Date
    Jul 2010
    Location
    Calgary, Alberta
    Posts
    186
    Vote Rating
    1
    nosarious is on a distinguished road

      0  

    Default doubletap moves on images moves the screen up.

    doubletap moves on images moves the screen up.


    I have a project which includes images with text overlaying them. For this project I have a menu that comes up in an overlay if you double-click on the page. However, if you click too high on the background image it will bring the menu bar down, and if you click too low on them it will push the whole page up (which also moves the very bottom limit of the text).

    This happens with an image in the very bottom-most background of the project (body) and one which is intended to move with a card (backgrounder)

    I suspect that it is because these images are scaled a bit larger to fit the screen when the site has been saved to the homescreen. (in fact, they are scaled to fit the ipad, which is a question I have for another day... how to change the image folder based on devices, so the image names stay the same, but they are taken from different locations)

    The source for the project is available here: http://code.google.com/p/publishing-...trunk/index.js

    an example to see how it is misbehaving is here: http://straathof.acadnet.ca/beta3.3/

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,159
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The description is fairly vague. You might want to expand on it a bit.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jul 2010
    Location
    Calgary, Alberta
    Posts
    186
    Vote Rating
    1
    nosarious is on a distinguished road

      0  

    Default


    Don't know how to be more specific than providing a working example...
    This photo should help. On the left is what I get when I double-tap on the background image near the top. On the right is what I get if I double-tap on the image near the bottom. Double-tapping on the text does not give this problem, but does open the menu properly.



    I was originally going to have it so a person taps on the background and the text disappears. Tap the screen again and it reappears, and double-tap opens the menu, but this 'double-tap&move the viewport' is a keeping me from going any further. I'm probably just not understanding the listeners and how they function.

  4. #4
    Ext User
    Join Date
    Jul 2010
    Location
    Calgary, Alberta
    Posts
    186
    Vote Rating
    1
    nosarious is on a distinguished road

      0  

    Default


    This event was being caused by the built-in 'zoom' function in safari. Some reading, a bit of surfing, and a few cookies later (chocolate chip, no less) and I found the answer by adding the following (bolded) line to my code responsible for reading double-tap.

    Code:
              listeners: {            
                    render: function(c){
                        c.body.on('doubletap', function(e, t){
                            //handle the double tap
                            mainmenu.show();
    
                            //remove safari's default response
                         event.preventDefault();
    
                        }, c); 
                    }       
                
                }

Similar Threads

  1. Panel with BorderLayout and Toolbar moves by itself
    By remi_v in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 12 Oct 2009, 5:51 AM
  2. [CLOSED] [1.2.1] DnD - DropTarget always moves (never copies)
    By monzonj in forum Ext GWT: Bugs (1.x)
    Replies: 1
    Last Post: 8 Jan 2009, 8:31 AM
  3. [2.1] Red Error Icon moves
    By smartlit in forum Ext 2.x: Bugs
    Replies: 3
    Last Post: 26 Jun 2008, 6:13 AM
  4. Radios and checkboxes moves
    By Absalom in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 18 Aug 2007, 5:22 AM
  5. Grid not resize when the SplitterBar in borderLayout moves?
    By davy_wei in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 7 Jan 2007, 8:26 AM

Thread Participants: 1

Tags for this Thread