Giter Site home page Giter Site logo

ionic-team / ionic-v1 Goto Github PK

View Code? Open in Web Editor NEW
193.0 35.0 187.0 40.16 MB

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic

License: Other

HTML 15.26% JavaScript 74.97% Shell 0.25% CSS 4.16% PHP 0.12% SCSS 5.24%

ionic-v1's Introduction

Ionic 1.x

Support for Ionic v1 ended in January 2017. We strongly recommend upgrading to the latest version of Ionic.

See the Migration from Ionic 1 Guide for migration information.

See Ionic Support Policy for the support status of each version of Ionic.

Visit https://ionicframework.com/docs for the latest Ionic documentation.


This is the repo for Ionic 1.x. If you're looking for the latest version (>= 2.0) of Ionic, please visit the main Ionic repo.

For new apps, we strongly recommend the latest version of Ionic which comes with the latest version of Angular, many new components, enhanced performance, and more.

For more information on Ionic 1.x, please read the original README.md

ionic-v1's People

Contributors

5im0n avatar ad-si avatar adamdbradley avatar ajoslin avatar antonshevchenko avatar arturokunder avatar bensperry avatar danbucholtz avatar deflomu avatar dkarzon avatar drewrygh avatar gregallensworth avatar ionitron avatar jgw96 avatar jriggins avatar malixsys avatar matiboy avatar mhartington avatar mikejpeters avatar mlynch avatar moroshko avatar perrygovier avatar sbatezat avatar sorich87 avatar tlancina avatar travisrussi avatar uniring avatar vitaliy-bobrov avatar wedgybo avatar zachmoreno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-v1's Issues

bug: ion-content scrolling not working with ion-slides directive (v1.2.1)

From @vchangal on December 20, 2015 17:0

Type: bug

Platform: all

With the new Ionic version available, I tried to migrate my current app to have the benefits of the new directive.
But I am currently struggling with a strange behavior after the migration. Scroll feature in slides (ion-slide-page) does not work anymore.
Indeed, for every slide, content is dynamically built using ng-repeat. But, when ng-repeat directive has finished to populate the DOM, scrolling area is not updated and user cannot scroll to bottom of the page.

I tried to build a codepen in order to enlight the issue:
https://codepen.io/anon/pen/LGNMLZ


MAJ

Okey, I found a workaround. May be used globally but I do not have assessed impact on performance and on other possible use cases with the directive.

In the directive 'ion-slides' definition ("slides.js"), I added the following lines in the link function:

 $scope.$watch(function(){                                               
     var queryResult = $element[0].querySelector('.swiper-slide-active');
     if(queryResult == null){return;}                                    
     var wrappedQueryResult = angular.element(queryResult);              
     var height = wrappedQueryResult.prop('scrollHeight');               
     return height;                                                      
 }, function(height){                                                    
     if(height != 0 && height != null){                                  
         $element.css('height', height + 'px');                          
     }                                                                   
 });                                                                     

What is your opinion?

Copied from original issue: ionic-team/ionic-framework#4830

bug: expose-aside-when cannot be applied only to one side menu

From @ps1dr3x on December 14, 2015 14:27

Type: bug

Platform: all

With this sample code:

<ion-side-menus>
  <!-- Left menu -->
  <ion-side-menu side="left" expose-aside-when="large">
  </ion-side-menu>

  <ion-side-menu-content>
  <!-- Main content, usually <ion-nav-view> -->
  </ion-side-menu-content>

  <!-- Right menu -->
  <ion-side-menu side="right">
  </ion-side-menu>

</ion-side-menus>

Both menus are exposed, not only the left side menu

Copied from original issue: ionic-team/ionic-framework#4779

bug: Nightly - overflow-scroll="true" doesn't work on a view in standard sidemenu project.

From @chrisciszak on March 7, 2015 13:55

Type: bug

Platform: android 4.4 webview

Overflow-scroll="true" on ion-content within a view is not working on Android 4.4 when using sidemenu project. This problem doesn't occur for beta 14 and cannot be repeated in desktop browser.

To repeat:

  1. Ionic start myApp sidemenu
  2. Add overflow-scroll="true" in ion-content for one of the views ie 'Browse'. Add more content.
  3. Run on android 4.4, bum scrolling not working in 'Browse' view.

This is a showstopper.

Copied from original issue: ionic-team/ionic-framework#3251

$ionicPlatform.ready() gets called immediately in browser

From @imgx64 on January 9, 2017 10:38

Ionic version:
[x] 1.x

I'm submitting a ...
[x] bug report

Current behavior:
When running app in browser using ionic serve, the callback of $ionicPlatform.ready() gets called immediately. This usually doesn't cause any problems, but some angular plugins suddenly broke in the browser (but kept working correctly on hardware) when I added jQuery instead of Angular's jqLite.

After some debugging, I found the issue is that inside app.run(), angular.element( ... ).scope() returns undefined (but only when using jQuery and running in a browser), and some angular plugins didn't like that. I solved the issue by adding a $timeout( ... , 0) inside $ionicPlatform.ready().

Expected behavior:
In here, I suggest deferring calling onPlatformReady() by a browser tick by using a timeout/promise/etc.

Copied from original issue: ionic-team/ionic-framework#9920

ion-content scrollbar issue on Android

From @sinedied on January 8, 2016 14:6

I just have setup a basic side menu app from the template, and have a strange issue only on Android: there is content overflow which cause a scrollbar and obviously enable scrolling, where it should not.

Here is a screen from ionic serve --lab (the issue is replicated on real device):

image

When I look at the HTML, it see an extra <div class="scroll">...</div> under the <ion-content> directive, that is not there on the iOS version. It seems the issue lies with this extra div, as it is offset of about 10px from the top of the ion-content box and the overflowing content that cause the scroll is the same size.

The issue is present in version 1.2.4.

Copied from original issue: ionic-team/ionic-framework#4928

bug: scrollTop doesn't work inside a modal

From @mshima on December 15, 2015 17:37

Type: bug

Platform: all

I need a modal to be shown in different parts of the application so I implemented it inside a service.
When the criteria changes or the modal hides the modal should be scrolled to the top.

When calling $ionicScrollDelegate.$getByHandle('??').scrollTop() the DelegateService filters the delegates based on $$delegateHandle name and the function $$filterFn;

The function passed by $ionicScroll is return $ionicHistory.isActiveScope()
Seems that $ionHistory ignores modals completely. Is this a bug??
The scrollTop will work only if the modal is created inside a controller and the controller scope is passed to the modal.

Copied from original issue: ionic-team/ionic-framework#4795

bug: option button duplicated if rendered conditionally

From @jrencz on December 22, 2015 19:53

Type: bug

Platform: all

When ion-option-button is rendered conditionally (for example inside ng-switch-when) it gets duplicated each time it's re-rendered.

Example:
http://codepen.io/jrencz/pen/bEeQNd

  1. Open options, observe 2 option buttons
  2. close options
  3. Increase counter
  4. Open options, observe 4 option buttons

Expected behaviour:
option buttons can be safely placed inside blocks rendered conditionally

Copied from original issue: ionic-team/ionic-framework#4853

$scope variable not updating in ion-nav-buttons in ion-side-menu

From @tobeee on January 10, 2017 1:59

Ionic version: (check one with "x")
[X] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Updating variable $scope.unread_count doesn't change the displayed value. $apply and $timeout don't work either. I've also tried disabling caching on the route and had no luck.

Expected behavior:

Steps to reproduce:
i) Add $scope.unread_notification variable to controller
ii) Set variable on ion-view-enter lifecycle event
iii) Update variable through broadcast
iv) Try to update display using $timeout or $apply(Async)

Related code:

<ion-side-menu-content>
    <ion-nav-bar class="ps-header" align-title="center" ng-class="hideNav == true ? 'hide-nav' : 'ps1-header'">
        <ion-nav-title align="left">
              <img src="img/global/header-logo.png" class="logo">

        </ion-nav-title>
        <ion-nav-buttons side="right">
            <div ng-click="viewAccount()">
              <img ng-src="{{avatarUrl(currentUser)}}" class="avatar-header"/>
             <span class="badge badge-positive notification">{{unreadCount}}</span> </img>
            </div>
        </ion-nav-buttons>
        <ion-nav-back-button class="button-clear">
          <i class="icon ion-ios7-arrow-back"></i>
          Back
        </ion-nav-back-button>
    </ion-nav-bar>
    <ion-nav-view name="menuContent" animation="slide-left-right"></ion-nav>

$scope.$on('update_notification', function (event, data) {
    //console.log("Hello from menu");
    CurrentUser.me().then(function successCallback(response) {
      console.log("Hello from menu",response)
      CurrentUser.data = response.data;

      $scope.$applyAsync(function () {
                  _this.unreadCount = CurrentUser.data.unread_count;
              });

      $timeout(function () {
              _this.unreadCount = CurrentUser.data.unread_count;
            //debug
            //alert (_this.unreadCount);
          }, 0);
     
    }, function errorCallback(response) {
      // called asynchronously if an error occurs
      // or server returns response with an error status.
    })
  });

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: Not installed
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.0.0
Xcode version: Xcode 7.3.1 Build version 7D1014 

Copied from original issue: ionic-team/ionic-framework#9928

View title is truncated on some screens

From @sryze on January 11, 2017 10:19

Ionic version:
[X] 1.x
[ ] 2.x

I'm submitting a ...
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

ion-view title is cut off on some screens followed by a "..." while on others, where the title is even longer, it's not. This happens 100% of time in my app on Android emulator (Nexus S API 23), but not in browser.

For example, here on the first screen the text "Facilities Booking" is truncated but on the second screen "Maintenance Reporting" is rendered in full length, even though it consists of more characters (18 vs 21):

screen shot 2017-01-11 at 15 37 57
screen shot 2017-01-11 at 15 38 17

Expected behavior:

Title should not be truncated in this case.

Steps to reproduce:

Other information:

Title was center using the following method:

.config(function($ionicConfigProvider) {
  $ionicConfigProvider.navBar.alignTitle('center');
})

Chrome inspector says that the title width is set on element (by Ionic code?):

element.style {
    left: 78px;
    right: 78px;
}

screen shot 2017-01-11 at 15 58 40

Possibly related issues:

ionic-team/ionic-framework#945
ionic-team/ionic-framework#4661

Right now I'm using the following CSS as a workaround:

.bar.bar-header .title {
  left: 50px !important;
  right: 50px !important;
}

Ionic info:

Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.3.0
Xcode version: Xcode 8.2.1 Build version 8C1002

Ionic framework version: 1.3.2
Device: Android Marshmallow with a 4 inch screen (Nexus S emulator, API 23)

Copied from original issue: ionic-team/ionic-framework#9950

ion-slides: tabbing between inputs on different slides messes up layout

From @fikkatra on January 8, 2017 15:14

Ionic version: (check one with "x")
[x ] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request

Current behavior:
When using ion-slides, if each slide contains an input and you hit 'tab' (or 'Next' on Android keyboard), the layout is messed up. It shows half of the current slide and half of the next slide.

Here's a plunkr illustrating the problem.

image

Expected behavior:
Either ignore the tab event if the next input is on another slide, or move to the slide properly.

Steps to reproduce:
Open plunkr
Put cursor in input field
Hit 'tab'

Ionic info::

ordova CLI: 6.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v5.5.0
Xcode version: Not installed

Copied from original issue: ionic-team/ionic-framework#9917

bug: Weird scrolling when focusing huge textarea

From @OrangeClyde on October 5, 2015 15:29

Type: bug

Platform: mobile webview

When focusing a textarea exceeding the screen, the textarea is scrolled to its end. This even happens when the textarea is focused already and you try to set the caret to another position.
Check the following Codepen and make sure to enable touch emulation in the developer tools - interestingly this seems to be working as long as click events are being triggered. After enabling touch emulation make sure to lose the focus by clicking the header once. Afterwards try to focus.

http://codepen.io/anon/pen/PPmwRa

I'd be grateful for any help on this - have tried a lot of stuff (set the textarea's height to the screen's height and use scrolling inside the textarea - didn't work as expected; had a look at contenteditable - no success). Surely this is not a very common use case, but it might occur at least sometimes on mobile devices that you encounter written texts in a text area exceeding the screen's height.

Thanks in advance and best regards!

Copied from original issue: ionic-team/ionic-framework#4472

ion-slides options (like autoplay) not working anymore?

From @1BJK903 on December 24, 2016 12:39

Ionic problems with ion-slides. I haven't changed anything at all, just updated. The autoplay was working before updating. When I remove all the options, the slides just says the same as with the options. So it looks like he is not reading / getting the options. What might be the problem here? I don't see any errors in the console btw.

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: macOS Sierra
Node Version: v6.8.1
Xcode version: Xcode 8.2.1 Build version 8C1002
Ionic version: "1.3.1-nightly-4219"

Is this a known issue? I am using

<ion-slides options="options" slider="slider">
....
...
<ion-slide-page>
...
</ion-slide-page>
</ion-slides>

And:

  $scope.options = {
    autoplay: 2500,
    loop: false,
    speed: 1000,
    slidesPerView: 1,
    centeredSlides: true
  }

Copied from original issue: ionic-team/ionic-framework#9783

$ionicView.beforeLeave not called when url parameter is changed

From @jovankrunic on January 9, 2017 14:6

Ionic version: (check one with "x")
[x] 1.x

I'm submitting a ... (check one with "x")
[x] bug report

Current behavior:
When going back to a previous view, using the back button, code in $ionicView.beforeLeave block of the view which is being left is not executed ($ionicView.beforeLeave of the appropriate controller is never triggered) in case when URL parameter of the abstract state is different between these views ( when using URL parameter inside for URL of the app's abstract state e.g. url: '/{app:foo|bar}').

Update: $ionicView.leave also not triggered.

Expected behavior:
Event $ionicView.beforeLeave of the view's scope should always be triggered whenever the view is being left while other view of the app is visited.

Steps to reproduce:

Using the demo do the following steps:

  1. Click the first list item (Foo's Playlist)
  2. Click Back
    Leaving playlist alert will be shown
  3. Click the second item (Bar's Playlist)
  4. Click Back
    No alert shown ($ionicView.beforeLeave not triggered)

Demo:
http://plnkr.co/edit/Nytn2QdbiST7kMNG6AkK?p=preview

Related code:

abstract state app (app.js):

  $stateProvider.state('app', {
    url: '/{app:foo|bar}',
    abstract: true,
    templateUrl: 'menu.html',
    controller: 'AppCtrl'
  })

$ionicView.beforeLeave block (controllers.js):

  $scope.$on('$ionicView.beforeLeave', function () {
    $scope.showAlert();
  });

Copied from original issue: ionic-team/ionic-framework#9922

bug: Tapping tab you are already on breaks app/caching #4013

From @ronaldjeremy on October 9, 2015 15:10

Type: bug

Platform: all

Here is the codepen illustrating the issues described below: http://codepen.io/ronaldjeremy/pen/NqGzoz/

Here are the steps to show the first bug:

1.) Open the Codepen
2.) click Tab2.
3.) click Tab1
4.) click Tab2
5.) click Tab2 again
6.) click Page2. You will see on this step, a page transition starts and then abruptly stops? Then your are stuck in this state -- clicking Page2 then does nothing?

For the second bug, there appears to be a cache clearing bug in ionic when you have a view more than 1 level deep, and you hit a tab to bring you back to the first level. In the codepen, we setup an alert on page2 to show when the controller gets called.

If you tap Tab2-->Page2, you get an alert. Then if you tap Tab2 again it brings you back to Page1 since you are already on Tab2 (this is good), and tapping Page2 will give you another alert.

Now for the scenario showing the bug:

Tap Tab2-->Page2-->Page3. Now tap Tab2 (it brings you back to Page1 like the previous example). But now if you tap Page2, there is NO alert. Ionic is caching that view when it shouldn't be.

Of interest is the bug does not occur if you use the history back buttons. It only happens when you are 2+ levels deep in tab, and hit that tab again to bring you to the top level of the tab.

If you are on tab2 and navigate to a child view, then click tab1, then tab2, it is going to show the "cached" child view on tab2. This is good and is the expected behavior.

However if you are on tab2, navigate to a child view, then click tab2 (which you are already on), it brings you to the topmost view of that tab. That is also a good thing. But at that point, ionic should clear out the cache of everything on that specific tab, but that isn't happening.

It looks like this bug ties in with the first in that they both have one thing in common -- tapping a tab that you are already on somehow breaks history/caching in that tab.

Copied from original issue: ionic-team/ionic-framework#4494

bug: Tab navigation is broken

From @BetterTrader on July 13, 2015 9:58

Type: bug

Platform: desktop browser

I think I found a bug but I'm unable to share a code here, since you'll need to run it locally and be able to open the app within an inner url:
Let's look at the regular tabs app - when you click "chats", choose a person and then click "chats" again - it goes back to the chats screen.
BUT - if you start the app fron an inner url ('#/tab/chats/0') and click "chats" - nothing will happen.
And not only that, but if you now navigate outside of the current view and click "chats" again - you'll be back at '#/tab/chats/0'

Anybody noticed that issue?
What can I do about it without using "ion-tab on-select"?

Copied from original issue: ionic-team/ionic-framework#4075

feat: Preserve the original coords of a drag gesture

From @MartinMa on January 6, 2016 14:5

Type: feat

Platform: all

The gesture ionic.Gestures.gestures.Drag has correct_for_drag_min_distance enabled by default. During touchmove when a drag is triggered, the event center is set to drag_min_distance pixels from the original event center. Without this correction, the dragged distance would jumpstart at drag_min_distance pixels instead of at 0.

It might be useful to save the original start point somewhere.

edit: I added a small pull request as a suggestion to fix this issue.

Copied from original issue: ionic-team/ionic-framework#4913

ion-tabs missing after $anchorScroll

From @zjx on December 13, 2016 6:24

Ionic version: (check one with "x")
[x ] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

After do $anchorScroll on the tab content then the tabs headers bar will be missing.

Expected behavior:

The tabs header bar should always be displayed on the page.

Related code:

In the html:
<ion-tabs class="tabs-striped tabs-positive tabs-background-aia tabs-color-light tabs-top tabs-icon-left">

        <ion-tab title="tab1" badge="" badge-style="" icon="ion-ios-compose" href="" on-select="" on-deselect="" ng-click="" >
            <ion-content class="has-header has-subheader has-tabs-top">
              <div ng-include src="'question.html'"></div>
            </ion-content>
        </ion-tab>

        <ion-tab title="tab2" badge="" badge-style="" icon="ion-ios-compose" href="" on-select="" on-deselect="" ng-click="" >
            <ion-content class="has-header has-subheader has-tabs-top">
              <div ng-include src="'question.html'"></div>
            </ion-content>
        </ion-tab>
</ion-tabs>

in the Controller:

            $location.hash(targetItem);
            $anchorScroll();
            $location.hash(oldLoc);

Copied from original issue: ionic-team/ionic-framework#9611

ion-toggle dragging bug

From @tomdrewes on December 15, 2016 16:8

Ionic version: (check one with "x")
[x ] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
If an ion-toggle is inside a parent element which is positioned/sized in some way other than spanning the entire viewport width, the logic for dragging the toggle is broken.

Expected behavior:
Dragging the toggle should work regardless of the parent container position/size in the viewport.

Steps to reproduce:
In this Codepen, it is possible to drag the toggles to the right (on) position, but not possible to drag them to the left (off) position:

https://codepen.io/tomdrewes/pen/QGJrqy

Related code:
The bug appears to be in ionic.views.Toggle.dragStart, which is using the Element.offsetXXX properties to store the initial drag information. It should probably use something like Element.getBoundingClientRect() to account for the viewport position since the gesture location information used elsewhere in the Toggle implementation is using that coordinate space. There is an example patch (commented out in the JavaScript pane) in the Codepen linked above.

Copied from original issue: ionic-team/ionic-framework#9652

bug: Three-finger scroll is not working with VoiceOver in IOS

From @ethier on July 17, 2015 16:56

Type: bug

Platform: ios 8 webview

In iOS 8, VoiceOver enabled, users are unable to three-finger swipe to scroll up/down a page, or open the menu.

Steps to reproduce:
In iOS 8 enable VoiceOver in the Accessibility menu
Open the test app
Three-finger swipe up to attempt to scroll down the page
Three-finger swipe left to attempt to open the main menu

Expected behaviour:
Three-finger swiping with VoiceOver enabled must act the same as single-finger swiping with VO disabled.

Notes:
Tested in iOS 8.4, iPhone 5S and iPhone 5C

Given that this is an issue in the native app, I've created a repo to clone that highlights the issue identified (no codepen).

With the latest ionic installed, clone the repo, add the IOS platform and deploy to a device (VoiceOver doesn't work in an emulator) to re-create this issue.

Copied from original issue: ionic-team/ionic-framework#4100

Nested <ion-nav-view> does not get cleared when going back to parent state

From @imgx64 on November 26, 2014 18:33

This is how it works with plain Angular and ui-router's ui-view: http://plnkr.co/edit/R8TLXVe2PuBcPHQiuPH8?p=preview

When you click Open child, the nested ui-view gets filled with the child template. Then you press Back, it goes back to the parent state and the ui-view is cleared.

This is the exact same code but with ionic's ion-nav-view instead: http://plnkr.co/edit/zzUU1YLE5gR0MOFoxECv?p=preview

When you press Back, the state does go back, but the nested view does not get cleared

Copied from original issue: ionic-team/ionic-framework#2617

Ionic app renders white screen on devices having ram less than 512 mb

From @SumantaBee on January 5, 2017 5:39

Ionic version: (check one with "x")
[x] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Hi! My ionic app is not suuporting android phones having ram less than 512 mb. How do I extend the support to these devices? The app renders a white screen on these devices.
Expected behavior:

Steps to reproduce:

Related code:

insert any relevant code here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Copied from original issue: ionic-team/ionic-framework#9880

bug: ionicViewSwitcher.transitionEnd not called causes multiple controller loads

From @pfiaux on January 3, 2017 8:32

Ionic version: (check one with "x")
[x] 1.x (1.3.2)
[ ] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request

Current behavior:
Given routes: home, section.child.
When going from section.child to home (using transitionDirection "back") and then back to section.child from home multiple times:

  • The scope & DOM "pane" elements stop being cleanedup
  • Additional controllers are loaded (first +1, then +2, +3, ...)

On iOS the app will crash when it reaches 7-8 additional scopes.

Expected behavior:
When caching is off views (both scope & dom elements) are cleaned up when successfully leaving a view.
Upon re-entering the view a single controller is instantiated.

Related code:

I was able to trace part of the problem to viewSwitcher.js:

function transitionComplete() {
  if (transitionComplete.x) return;
  transitionComplete.x = true;

  enteringEle.off(TRANSITIONEND_EVENT, completeOnTransitionEnd);
  $timeout.cancel(enteringEle.data(DATA_FALLBACK_TIMER));
  leavingEle && $timeout.cancel(leavingEle.data(DATA_FALLBACK_TIMER));

  // resolve that this one transition (there could be many w/ nested views)
  deferred && deferred.resolve(navViewCtrl);

  // the most recent transition added has completed and all the active
  // transition promises should be added to the services array of promises
  if (transitionId === transitionCounter) {
    $q.all(transitionPromises).then(ionicViewSwitcher.transitionEnd);

    // emit that the views have finished transitioning
    // each parent nav-view will update which views are active and cached
    switcher.emit('after', enteringData, leavingData);
    switcher.cleanup(enteringData);
  }

  // tell the nav bars that the transition has ended
  $ionicNavBarDelegate._instances.forEach(function(instance) {
    instance.triggerTransitionEnd();
  });


  // remove any references that could cause memory issues
  nextTransition = nextDirection = enteringView = leavingView = enteringEle = leavingEle = null;
}

From debug I can see that the problem starts when I have 3 transition promises (let's give them transitionIds 1,2,3 and transitionCounter=3). What happens is they resolve in the following order:

  • 1
  • 3
  • 2 never resolves

I believe the problem is that when 3 resolves transitionComplete() is called the $q.all() is waiting for 2 to resolve, switcher.cleanup() then happens first. switcher.cleanup() seems to remove the element which is transitioning, which would cause the transitionPromise 2 to never resolve (since it's element was removed before transitionEnd).

In turns ionicViewSwitcher.transitionEnd is never called and the view (scope&DOM) is never properly cleaned up. Worse the transitionPromsies array is never reset (because it happens in ionicViewSwitcher.transitionEnd). This causes every route change after to also contain the "stuck" promise and to fail the same way causing an increasing memory leak.

If I comment out the switcher.cleanup(enteringData); call then transitionEnd is properly called once all 3 promises are resolved.

Could switcher.cleanup(enteringData); also be moved inside the $q.all after transitionEnd()?

Other information:

  • View cache is disabled (max is set to 0, and cache: false is on the routes)
  • Issue happens in webkit browsers like ios or chrome on osx (firefox seems to have no problem with it).
  • If I don't use nextDirection("back") the leak doesn't happen (because of the first check in cleanup())

Ionic info:

Cordova CLI: 6.4.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
ios-deploy version: 1.9.0
ios-sim version: 5.0.9
OS: Mac OS X Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

Copied from original issue: ionic-team/ionic-framework#9848

Multiple input devices problem in scrollView

From @norami on January 10, 2017 16:22

Ionic version: (check one with "x")
[x ] 1.x
[] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
Some PCs enable multiple input devices. For example, Windows surface PCs enable both of touch device (physically screen) and mouse (physically touch panel or mouse). But ionic allow to use one kind of input device by the determination running on initialisation.

This leads very troubling behaviour. On windows surface PCs, user can click element with screen and touch panel while use cannot scroll element only with screen.

Expected behavior:

Like most applications, apps should enable multiple devices. In other words use should be able to use both of mouse (including touch panel) and touch device (screen of tablet).

Steps to reproduce:

With chrome debugger, you can reproduce easily this problem.

  1. Create app with ionicScroll.
  2. Load app to chrome with touch device mode. (ionic determine input device as touch device and disable scrolling with mouse)
  3. Toggle off touch device mode.
  4. You can not scroll with mouse.

Reversal pattern goes well:

  1. Create app with ionicScroll.
  2. Load app to chrome with normal mode. (ionic determine input device as mouse and disable scrolling with touch panel)
  3. Toggle on touch device mode.
  4. You can not scroll with touch panel.

Related code:

I can use a monkey patch code shown in the lines below. This seems to work without any problem.

    if ('ontouchstart' in window) {
      // Touch Events
      container.addEventListener("touchstart", self.touchStart, false);
      if(self.options.preventDefault) container.addEventListener("touchmove", self.touchMoveBubble, false);
      document.addEventListener("touchmove", self.touchMove, false);
      document.addEventListener("touchend", self.touchEnd, false);
      document.addEventListener("touchcancel", self.touchEnd, false);

    }
    if (window.navigator.pointerEnabled) {
      // Pointer Events
      container.addEventListener("pointerdown", self.touchStart, false);
      if(self.options.preventDefault) container.addEventListener("pointermove", self.touchMoveBubble, false);
      document.addEventListener("pointermove", self.touchMove, false);
      document.addEventListener("pointerup", self.touchEnd, false);
      document.addEventListener("pointercancel", self.touchEnd, false);

    }
    if (window.navigator.msPointerEnabled) {
      // IE10, WP8 (Pointer Events)
      container.addEventListener("MSPointerDown", self.touchStart, false);
      if(self.options.preventDefault) container.addEventListener("MSPointerMove", self.touchMoveBubble, false);
      document.addEventListener("MSPointerMove", self.touchMove, false);
      document.addEventListener("MSPointerUp", self.touchEnd, false);
      document.addEventListener("MSPointerCancel", self.touchEnd, false);
    }
    if ('onmousedown' in window) {
      // Mouse Events
      var mousedown = false;

      // omitted  

      container.addEventListener("mousedown", self.mouseDown, false);
      if(self.options.preventDefault) container.addEventListener("mousemove", self.mouseMoveBubble, false);
      document.addEventListener("mousemove", self.mouseMove, false);
      document.addEventListener("mouseup", self.mouseUp, false);
      document.addEventListener('mousewheel', self.mouseWheel, false);
    }
    if ('onwheel' in window) {
      document.addEventListener('wheel', self.mouseWheel, false);
    }

original code is line 5380 of:
https://github.com/driftyco/ionic/blob/fded25c17864ac9bc37aedd9c1abf2295f4dca03/release/js/ionic.js

Copied from original issue: ionic-team/ionic-framework#9937

Preventing a state from leaving when changing Tab

From @Akyraah on January 7, 2017 11:56

Hello everyone !

Ionic version: (check one with "x")
[x] 1.x

I'm submitting a ... (check one with "x")
[x] bug report

I'd like to prevent a state change when leaving a specific view.
I read a lot on the internet about issues on the matter, mainly that event.preventDefault() used in $stateChangeStart doesn't actually prevent the change of state but prevent only the loading of the destination page.

To illustrate this, I tried to put my code in this preview :
https://plnkr.co/edit/qpROWVWRBiO2WfmLK87N?p=preview
Unfortunately, I can't get it to work in the preview and I'm not sure why...

The main part of the code is :

$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
		if (fromState.url == "/specific_view"){
			if (toState.url != "/specific_view"){
				
			console.log("toState: " + JSON.stringify(toState));
			console.log("toParams: " + JSON.stringify(toParams));
			console.log("fromState: " + JSON.stringify(fromState));
			console.log("fromParams: " + JSON.stringify(fromParams));
			
			event.preventDefault();
			
			$state.transitionTo("tabs.specific_view", null, {notify:false});
			$state.go('tabs.specific_view');
			return;
			}
		}
	});

It seems to work when leaving from the nested state to the parent state (by firing a backButton) but it doesn't when I'm changing tab.

Thank you for your time,

Aurélien

Copied from original issue: ionic-team/ionic-framework#9908

bug: Collection-Repeat Swipe Option Delete

From @davidpatrick on May 31, 2015 0:12

Type: bug

Platform: ios 7 webview

While using ng-repeat, if you add a delete button as one of the ion-option-buttons, when you splice that item from the array it properly removes the element from the array and removes the swiped options.

However using collection-repeat it will leave the options open and you have to manually close them, which gives the appearance at first glance that it didn't remove the item and only closed the options. Is there anyway other way to accomplish this with collection-repeat?

With collection-repeat: http://codepen.io/davidpatrick/pen/VLPXVJ
With ng-repeat: http://codepen.io/davidpatrick/pen/NqdYed

Copied from original issue: ionic-team/ionic-framework#3867

bug: has-footer not applied if ionFooterBar has ngIf

From @jrencz on December 30, 2015 11:10

Type: bug

Platform: all

In case where ionFooterBar has additional scope on it (applied via ng-if) it fails to reach ionView scope to set $hasFooter flag (which is used by ionContent to apply has-footer class). See:
where ionFooterBar writes the scope flag: https://github.com/driftyco/ionic/blob/9de76628b987edf1823bc0b5f3eca76bd9e8b559/js/angular/directive/headerFooterBar.js#L157
and where ionContent reads it https://github.com/driftyco/ionic/blob/9de76628b987edf1823bc0b5f3eca76bd9e8b559/js/angular/directive/content.js#L84-L94

If ngIf is added to ionFooterBar then ionFooterBar writes to an incorrect scope

In fact this behaviour (as well as the workaround) is well described in the official pen: Footer Toggle: Nightly http://codepen.io/ionic/pen/mHtlC

Additional ngClass bound to the same flag showFooter as used in ngIf attribute on the ionFooterBar is responsible for applying has-footer class onto ionContent element.

The same problem with header/subheader/subfooter

I think the way to fix this would be for ionFooterBar/ionHeaderBar to require ionContent controller (which does not exist yet) and ionContent controller should expose methods to set all those flags (header/subheader/footer/subfooter/tabs/etc).

Scope traversal is always error-prone ;)

Copied from original issue: ionic-team/ionic-framework#4880

bug: Drag events not working in Android 4.4.2

From @MartinMa on May 11, 2015 6:25

Type: bug

Platform: android 4.4 webview

This issue refers to a regression introduced with this commit from 19 Mar.

This is a new issue as desired by @perrygovier. Again (concerning above commit), what exactly do you mean by "Prevent gestures from breaking native scrolling"? Is there a use/test case? I could't find a related issue.

Here is a codepen that demonstrates the issue (try to drag the red box): http://codepen.io/MartinMa/pen/vOEmVR

Please confirm.

To get it up and running on your Android device, run the following commands using Ionic CLI.

ionic start dragtest http://codepen.io/MartinMa/pen/vOEmVR
cd dragtest
ionic platform add android
ionic run android

As already mentioned by @gregor-srdic, this issue also affects built-in events like on-hold. (see issue 1729)

There is a work around. You have to pass {prevent_default_directions = ['left', 'up', 'right', 'down']} as fourth argument to $ionicGesture.on.

I think preventDefault(); should be the default, if 'overflow-scroll' isn't present? With the current behavior it breaks drag gestures when using Ionic scroll - which is the default. So it's broken by default ;)

Copied from original issue: ionic-team/ionic-framework#3695

bug: Ion-slides error returning to 1st slide with loop

From @elaval on January 4, 2016 16:14

Type: bug

Platform: all

Problem on ionic 1.2.1 & ion-slides

I have a slide box (ion-slides) with looping & slides generated via ng-repeat. Each slide has an "ion-list" with items that are also generated via ng-repeat.

For example,
Slide1: A,B,C
Slide2: D,E,F
Slide3: G,H,I

  <ion-slides options="{loop:true}">
    <ion-slide-page ng-repeat="page in controller.data">
      <ion-list>
        <ion-item ng-repeat="item in page.items">
          {{item}}
        </ion-item>
      </ion-list>
    </ion-slide-page>
  </ion-slides>

In the controller:
this.data = [
{items:["A","B","C"]},
{items:["D","E","F"]},
{items:["G","H","I"]}
]

When I swipe right on the last side, I go back to the first slide but the list content of the first slide is now distorted:

Slide1: A, A, A, B, B, B, C, C, C

The same happens if I swipe left on the first slide going to the last slide.

Example provided on Code Pen: http://codepen.io/elaval/pen/XXpoLy

Copied from original issue: ionic-team/ionic-framework#4901

bug: Having a hidden subheader causes the main header to overlap the conten

From @ptarjan on May 12, 2015 19:36

Type: bug

Platform: all

In headerFooterBarDirective the prelink looks like:

        $scope.$watch(function() { return $element[0].className; }, function(value) {
          var isShown = value.indexOf('ng-hide') === -1;
          var isSubheader = value.indexOf('bar-subheader') !== -1;
          $scope.$hasHeader = isShown && !isSubheader;
          $scope.$hasSubheader = isShown && isSubheader;
        });

If you have two <ion-header-bar>s one with class=bar-subheader, but second one has ng-show=false this will get called twice. The first time $hasHeader is nicely true but the second time both $hasHeader and $hasSubheader will be false causing the content to be overlapped.

Copied from original issue: ionic-team/ionic-framework#3711

When toggle a div or load an image to a div scrolling gets disabled and only part of the page is visible.

From @KavishPeiris1 on December 19, 2016 10:25

Ionic version: (check one with "x")
[x ] 1.x
[ ] 2.x

I'm submitting a ... (check one with "x")
[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

When toggle a div or load an image to a div scrolling gets disabled and only part of the page is visible.

Expected behavior:

Scroll smoothly like a native application.

Steps that I tried:
I have used $ionicScrollDelegate.resize() but it doesn't work.
Therefore I called $ionicScrollDelegate.scrollBottom() inside function to load the full page and it works.
But after I scroll to top again it hides the bottom part same as before.

insert any relevant code here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Copied from original issue: ionic-team/ionic-framework#9698

bug: Reopening - bug: Navigation and history #4078

From @badhrin on November 19, 2015 15:7

Type: bug

Platform: android 4.4 webview

I am reopening a bug reported in 2013. It was closed automatically by Ionitron around 2-Nov-2015.

The bug is elaborated very well in the old issue (now closed). Please refer to it here:
ionic-team/ionic-framework#4078

Restating the bug again in my own words & experience:
ISSUE 1
In an Ionic app using tabs, when we navigate using the $state.go() as below :
Parent State (showing initial data set 1) -> Child State 1 -> Parent State (showing updated data set 2)
The issue is that the Parent State (showing updated data set 2) shows a back button. Ideally I would expect the history stack to be reset to the Parent State & no back button should ever be shown in the Parent state.

CURRENT TEMP FIX FOR ISSUE 1: Use the 'hide-back-button' directive in Parent View

ISSUE 2:
In an Ionic app using tabs, when we navigate using the $state.go() as below :
Parent State (showing initial data set 1) -> Child State 1 -> Parent State (showing updated data set 2) -> Child State 1 -> Use back button in Child State 1 to go back to Parent State
The issue is that instead of going to Parent State (showing updated data set 2) it goes to Parent State (show initial data set 1).

CURRENT TEMP FIX FOR ISSUE 2: Do not cache the Parent State i.e Set cache-view = false in the Parent View

Copied from original issue: ionic-team/ionic-framework#4648

bug: Drag events not working in Android 4.4.2

From @MartinMa on May 11, 2015 6:25

Type: bug

Platform: android 4.4 webview

This issue refers to a regression introduced with this commit from 19 Mar.

This is a new issue as desired by @perrygovier. Again (concerning above commit), what exactly do you mean by "Prevent gestures from breaking native scrolling"? Is there a use/test case? I could't find a related issue.

Here is a codepen that demonstrates the issue (try to drag the red box): http://codepen.io/MartinMa/pen/vOEmVR

Please confirm.

To get it up and running on your Android device, run the following commands using Ionic CLI.

ionic start dragtest http://codepen.io/MartinMa/pen/vOEmVR
cd dragtest
ionic platform add android
ionic run android

As already mentioned by @gregor-srdic, this issue also affects built-in events like on-hold. (see issue 1729)

There is a work around. You have to pass {prevent_default_directions = ['left', 'up', 'right', 'down']} as fourth argument to $ionicGesture.on.

I think preventDefault(); should be the default, if 'overflow-scroll' isn't present? With the current behavior it breaks drag gestures when using Ionic scroll - which is the default. So it's broken by default ;)

Copied from original issue: ionic-team/ionic-framework#3695

collection-repeat, performance problem

From @DimaKoval on January 5, 2017 14:46

Ionic version:
[x] 1.x (1.3.2)
[ ] 2.x

I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
little jumps while scrolling, not smooth experience even with iPhone 7

Expected behavior:
smooth scroll

Steps to reproduce:
http://plnkr.co/edit/BlNR4M?p=preview

Other information:
i'm using ionic-cache-src plugin, maybe there is a problem, but with regular img+ng-src code it works even slower(in my opinion) than ionic-cache-src+background style property

Ionic info:
Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.9.2
Xcode version: Xcode 8.2 Build version 8C38

i just wanted to know is it known issue, or i'm the only one experiencing such behavior

Copied from original issue: ionic-team/ionic-framework#9891

bug: $ionicHistory.clearHistory() should hide back btn

From @sp00m on January 6, 2016 9:30

Type: bug

Platform: all

$ionicHistory.clearHistory() does not hide the back button.

http://plnkr.co/edit/PpCUCzZauTTYNFo1v3o7

  1. Use the side menu to go to the "Sign In" page: the back button appears
  2. Click the "Clear History" button: the history gets cleared, the back button remains
  3. Click the back button: nothing happens since the history has been cleared.

IMO, $ionicHistory.clearHistory() should hide the back button.

Copied from original issue: ionic-team/ionic-framework#4909

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.