ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Drag problems with when using side menus and tabs

Open roysaad opened this issue 11 years ago • 5 comments

Type: bug

Platform: all

When an app has a side menu and tabs at the same time, ion-scrolls do not scroll correctly and range handles cannot be dragged smoothly. Issue are not noticed in the first tab.

Check: http://play.ionic.io/app/81bb4cb75af7

roysaad avatar May 15 '15 09:05 roysaad

PS: Issue seems to disappear if I comment the following in ionic.bundle.js

self.isDraggableTarget = function(e) { //Only restrict edge when sidemenu is closed and restriction is enabled var shouldOnlyAllowEdgeDrag = self.edgeThresholdEnabled && !self.isOpen(); var startX = e.gesture.startEvent && e.gesture.startEvent.center && e.gesture.startEvent.center.pageX;

var dragIsWithinBounds = !shouldOnlyAllowEdgeDrag || startX <= self.edgeThreshold || startX >= self.content.element.offsetWidth - self.edgeThreshold;

var backView = $ionicHistory.backView(); var menuEnabled = enableMenuWithBackViews ? true : !backView;

/\* if (!menuEnabled) { var currentView = $ionicHistory.currentView() || {}; return backView.historyId !== currentView.historyId; }

*/

return ($scope.dragContent || self.isOpen()) && dragIsWithinBounds && !e.gesture.srcEvent.defaultPrevented && menuEnabled && !e.target.tagName.match(/input|textarea|select|object|embed/i) && !e.target.isContentEditable && !(e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-scroll') == 'true'); };

roysaad avatar May 15 '15 09:05 roysaad

Will like to add that it works if the first landing page is the view with the input range. The problem is if you have an input range that is not the initial view loaded. Here's an example: http://play.ionic.io/app/7e802b9a8faf

hey-tony avatar Jun 03 '15 14:06 hey-tony

Hello all! Is this still an issue with the latest version of ionic? Thanks!

jgw96 avatar May 05 '16 16:05 jgw96

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

jgw96 avatar May 10 '16 14:05 jgw96

I just tested it on ionic 1.3.0. There were no issues. Thank you for your efforts.

roysaad avatar May 10 '16 14:05 roysaad