Commit Graph

144 Commits

Author SHA1 Message Date
Adam Bradley
5c300dd3e0 refactor(platform): Rename isCordova() to isWebView()
BREAKING CHANGE: ionic.Platform.isCordova() has been renamed to
ionic.Platform.isWebView()
2014-04-07 11:56:11 -05:00
Adam Bradley
79f6b251c3 test(tap): Tests for ignoreTapInspect, recordCoordinates, isRecentTap 2014-04-07 11:07:31 -05:00
Adam Bradley
a977332f2b fix(tap): Do not preventDefault after input focus, #1068 2014-04-07 09:43:41 -05:00
Adam Bradley
e3c59e96a9 test(tap): add some more tests for taps 2014-04-07 00:44:29 -05:00
Adam Bradley
cf686548da fix(tap): Remove 300ms delay when tapping select elements 2014-04-05 23:43:12 -05:00
Adam Bradley
b1d9ab84f4 run not ran 2014-04-05 21:28:12 -05:00
Adam Bradley
ead30f2ed5 docs(platform): Explain ionic.Platform.ready() further 2014-04-05 20:46:17 -05:00
Adam Bradley
cb602b587b fix(tap): Prevent clicks from firing after scrolling, #579 2014-04-04 12:28:42 -05:00
Adam Bradley
3ee5ea77a6 fix(tap): Deactivate elements during scroll at the same time click is ignored, #997
Previously I disabled the activation class immediately on a touchmove,
where as the click will still work if you touchstart and touchend
within a few pixels of each other. So visually it may have looked like
the click shouldn't have worked. I just updated it so the use the same
numbers. For example, if you hold down an item and move just 5 pixels,
the item will stay active (before it wouldn't have), and the click will
fire. But at the same time, if you hold down an item, and move a larger
distance, once it realizes that it went farther than 6 pixels it'll not
allow a click to happen, AND it'll not show the item as being active.
2014-04-03 23:24:31 -05:00
Adam Bradley
0c1362861d refactor ionic.tap and start writing tests 2014-04-03 13:52:48 -05:00
Adam Bradley
f2d52ea987 set focus() only if it wasn't scrolled, selection and type=email throws errors 2014-04-02 16:04:01 -05:00
Adam Bradley
66ecec7031 fix(scroll): Fix input focus when tapped, do not scroll when target is an input, closes #1020 2014-04-02 14:22:56 -05:00
Adam Bradley
78510099ad fix(tap): Do not simulate a click if it was from a touchcanel event, closes #1015 2014-04-02 10:07:45 -05:00
Adam Bradley
5f3a1d21c6 fix(tap): Prevent multiple clicks when overriding cordova object, closes #1022 2014-04-02 09:57:16 -05:00
Adam Bradley
f3bd258c9e fix(tap): Prevent "clicking" when scrolling 2014-04-01 10:34:36 -05:00
Adam Bradley
9a49129aa0 fix(tap): Increate isScrolledSinceStart from 2px radius to 15px, #970 2014-03-30 23:00:35 -05:00
Adam Bradley
870dcd6f99 fix(active): Taps/clicks now use .activated instead of .active, closes #913
Both .active and .activated classes exist within the css now. When a
button/link/item is “active”, the .activated class gets added and
removed. This is so Ionic is not removing any user defined .active
classes, but also so users can use Ionic’s active classes (but not have
to worry about them being removed automatically by Ionic). Styled the
same by default, but easily overridden.
2014-03-27 21:26:59 -05:00
Andy Joslin
4b5db0de52 docs(ionic.EventController.onGesture): list available eventTypes
Closes #896
2014-03-26 20:54:30 -06:00
Adam Bradley
b1a7c1990a fix(toggle): Changed tap listener to use "release", closes #882 #881 2014-03-24 16:21:44 -05:00
Adam Bradley
dccf7b4182 rename .hide-footer to .footer-hide 2014-03-24 13:11:03 -05:00
Adam Bradley
60e4533313 fix(tap): Trigger clicks if touch/click held for more than 250ms, closes #791 2014-03-24 12:39:18 -05:00
Adam Bradley
76a5313480 fix(tap): Reset startCoordinates on touchend/mouseup, closes #874 2014-03-24 10:52:33 -05:00
Adam Bradley
001bcca4fa fix(click): Increase the ghost click prevent delay for grade C devices 2014-03-21 14:14:09 -05:00
Adam Bradley
c355114365 prevent double active states on touch 2014-03-21 14:13:14 -05:00
Adam Bradley
423f9e4f77 fix(active): Updated which elements to set active class along w/ tests, closes #857 2014-03-21 09:08:40 -05:00
Adam Bradley
681a6a2ed7 feat(ready): Add 'platform-ready' css class to the body when the platform is ready 2014-03-20 16:38:59 -05:00
Adam Bradley
97e69f0464 only add move listener for pointer type started with, touch or mouse 2014-03-20 14:19:03 -05:00
Adam Bradley
f852661979 check StatusBar obj exists before calling it 2014-03-19 13:59:36 -05:00
Adam Bradley
a637fb4d1b fix(domready): Fixed if firing off callbacks when DOM was already ready 2014-03-19 13:59:36 -05:00
Andy Joslin
dbe4e3901d feat(ionic): remove all delegates
BREAKING CHANGE: $ionicScrollDelegate, $ionicSlideBoxDelegate, and
$ionicSideMenuDelegate have been removed.

  - $ionicScrollDelegate has been changed to $ionicScrollController.
    Documentation:
    [ionContent](
    http://ajoslin.github.io/docs/nightly/api/directive/ionContent),
    [ionScroll](
    http://ajoslin.github.io/docs/nightly/api/directive/ionScroll)

    Change your code from this:

    ```html
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope, $ionicScrollDelegate) {
      $scope.scrollBottom = function() {
        $ionicScrollDelegate.scrollBottom();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see docs -->
    <ion-content ng-controller="MyCtrl">
      <button ng-click="scrollBottom()">Scroll to bottom!</button>
    </ion-content>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.scrollBottom = function() {
        $scope.$ionicScrollController.scrollBottom();
      };
    }
    ```

  - $ionicSideMenuDelegate has been changed to
    $ionicSideMenusController. Documentation:
    [ionSideMenus](http://ajoslin.github.io/docs/nightly/api/directive/ionSideMenus)

    Change your code from this:

    ```html
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope, $ionicSideMenuDelegate) {
      $scope.toggleLeftMenu = function() {
        $ionicSideMenuDelegate.toggleLeft();
      };
    }
    ```

    To this:

    ```html
    <!-- optional attr controller-bind, see documentation -->
    <ion-side-menus>
      <ion-side-menu side="left">Side Menu Left</ion-side-menu>
      <ion-pane ion-side-menu-content ng-controller="MyCtrl">
        <button ng-click="toggleLeftMenu()">
          Toggle Left Menu!
        </button>
      </ion-pane>
    </ion-side-menus>
    ```
    ```js
    function MyCtrl($scope) {
      $scope.toggleLeftMenu = function() {
        $scope.$ionicSideMenuController.toggleLeft();
      };
    }
    ```

  - $ionicSlideBoxDelegate has been removed and upgraded to
    $ionicSlideBoxController. It had only one method that
    was unneeded.  [Documentation](
    http://ajoslin.github.io/docs/nightly/api/directive/ionSlideBox)
2014-03-19 11:51:07 -06:00
Adam Bradley
26c8f304e7 fix(range): Clicking Line For Range Causes Drag Button To Follow Mouse, close #779 2014-03-19 10:26:11 -05:00
Adam Bradley
3d917c83f5 fix(tap): Remove select element from tap checking, closes #836 2014-03-19 08:32:30 -05:00
Adam Bradley
f602674a19 fix docs method names 2014-03-18 13:19:38 -05:00
Adam Bradley
6627aafe05 improve hiding status bar and reduce flickers 2014-03-18 11:56:24 -05:00
Adam Bradley
dc138b4fa3 do not remove cordovans deviceready event listener 2014-03-18 09:04:50 -05:00
Adam Bradley
bd4c1f48a5 modify how elements remove active class 2014-03-18 08:48:58 -05:00
Max Lynch
72ee799c4e fix(click): enter key submission blocked. Fixes #819 2014-03-17 19:32:17 -05:00
Adam Bradley
8c55e280ba fix scrolling through list causes "active" class on items 2014-03-17 13:47:04 -05:00
Andy Joslin
bd66fc8b28 docs(): remove group tag 2014-03-17 10:24:28 -06:00
Adam Bradley
f8a7137744 fix(click): Click Events In SlideBox Fire Multiple Times, closes #808 2014-03-17 08:01:57 -05:00
Adam Bradley
baa04cde4d feat(active): Removing use of :active in favor of .active for more control of active state
Using the :active pseudo works fine for desktop, but mobile is a
completely different beast, especially with the quirks of each
platform. By intentionally not using any :active selectors and manually
adding/removing a .active class, it gives us a precise control on how
the active state works for ALL platforms. Additionally, this places
less selectors in the css, and reduces the possibility of unnecessary
repaints. Currently this method of using .active instead of :active is
being applied to .button and .item elements.
2014-03-15 01:12:56 -05:00
Adam Bradley
a3ea027fb0 fix indent alignment 2014-03-14 22:20:12 -05:00
Andy Joslin
8619d5e8ec docs(): add groups by topic 2014-03-14 15:14:16 -06:00
Adam Bradley
4066682381 separate tap from poly to make it easier to avoid tap logic in the future 2014-03-12 22:28:10 -05:00
Andy Joslin
4813fd0bb9 docs: allow multiple versions 2014-03-12 15:55:50 -06:00
Adam Bradley
98e7e1aa87 fix(tap): Do not trigger a click if the element was scrolled after touchstart/mousedown 2014-03-11 16:20:19 -05:00
Andy Joslin
e9625ded9d docs: add services, utilities 2014-03-11 13:02:36 -06:00
Adam Bradley
6f2d6e7c5a fix(tap): Do not detect taps for input[type=file], closes #652 2014-03-10 11:45:15 -05:00
Adam Bradley
64ad982853 tapped element should only climb up a max of 5 parents 2014-03-10 11:20:11 -05:00
Adam Bradley
181269a2fe do not set a platform if unknown, closes #753 2014-03-09 22:01:38 -05:00