Results 1 to 10 of 10

Thread: Ext.Menu swipe does not work, even in kitchen sink

    You found a bug! We've classified it as TOUCH-5328 . 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
    Sep 2013
    Location
    Area Alsace, France
    Posts
    10

    Default Ext.Menu swipe does not work, even in kitchen sink

    We are using touch 2.3.1 and tried to implement the Ex.Menu.

    Not with your example kitchen sink nor using the Ext.Menu in our application the swipe (from whatever edge) works, toggleMenu has no problem. Tried on iPad (iOS7, latest version Safari/Chrome), OSX-Mavericks (latest version Safari/Chrome)

    The errors shown on the console in all cases (Kitchen sink iPad, desktop) are:

    - TypeError: 'undefined' is not an object (evaluating 'this.getTranslatable().on')
    >>> Ext.viewport.Default#onEdgeSwipeEnd
    Code:
    ...
    if (menu.$cover) {
                menu.getTranslatable().on('animationend', function() {
                    if (shouldRevert) {
                        menu.hide();
                    }
                }, this, {
                    single: true
                });
    
    
                menu.translate(after.translateX, after.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
    
    
            }
            else {
                this.getTranslatable().on('animationend', function() {
                    if (shouldRevert) {
                        menu.hide();
                    }
                }, this, {
                    single: true
                });
    
    
                this.translate(viewportAfter.translateX, viewportAfter.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
            }
    and
    - TypeError: 'null' is not an object (evaluating 'point.x')
    >>> Ext.util.Point#getDistanceTo

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,388

    Default

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

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Posts
    7

    Default

    I'm also experiencing the same bug. It's strange after so many months the bug is still around. No one uses Ext.Menu component? I thought this one would be extremely popular but there are not many complaints though.
    Any plans to fix it or any workaround? Thanks!

  4. #4

    Default

    My workaround for Sencha Touch 2.4.1 is to replace in touch\src\viewport\Default.js line 1043
    Code:
    if (checkMenu.isHidden() !== false) {
    with
    Code:
    if (checkMenu.isHidden() == false) {
    See also here
    http://stackoverflow.com/questions/2...93950#29093950

  5. #5
    Sencha Premium Member Tarabass's Avatar
    Join Date
    Jun 2010
    Location
    The Netherlands
    Posts
    51

    Default

    That would be

    Code:
    if (checkMenu.isHidden() === false) {
    don't you think

  6. #6
    Sencha User
    Join Date
    Mar 2015
    Posts
    34

    Default

    Quote Originally Posted by vitalii.blagodir View Post
    My workaround for Sencha Touch 2.4.1 is to replace in touch\src\viewport\Default.js line 1043
    Code:
    if (checkMenu.isHidden() !== false) {
    with
    Code:
    if (checkMenu.isHidden() == false) {
    See also here
    http://stackoverflow.com/questions/2...93950#29093950
    This worked for me in Touch 2.4.1 as well.

    Instead of modifying the Touch source, I created an override.

  7. #7
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Sydney
    Posts
    116

    Default

    This bug still exists in ExtJS6 modern toolkit. The same fix still applies.

  8. #8
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Sydney
    Posts
    116

    Default

    FYI, the override we are using for ExtJS6 Modern is below. We were getting errors in onEdgeSwipeEnd too.

    In our application, we don't want to be able swipe from the side to bring the menu up (must click the button instead) as we have a carousel which the menu gets in the way of when trying to swipe through items, so we can get away with short-circuiting things.

    Code:
    Ext.define('App.override.viewport.Default', {
        override: 'Ext.viewport.Default',
    
        onSwipeStart: function(e) {
        	e.stopPropagation();
        },
        
        onEdgeSwipeStart: function(e) {
        	e.stopPropagation();
        	return;
        },
        
        onEdgeSwipeEnd: function(e) {
        	e.stopPropagation();
        	return;
        }
    });

  9. #9
    Sencha Premium User
    Join Date
    Jul 2015
    Posts
    28

    Default

    I have the same problem with Sencha 6.0.1 The line should be 1033


    Code:
    if (checkMenu.isHidden() == false) { return; }

  10. #10
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default

    It would be nice to see it eventually fixed in ExtJS 6 modern toolkit. Dear colleagues, thank you for reporting this bug and workaround. It helped a lot.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

Posting Permissions

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