Commit Graph

153 Commits

Author SHA1 Message Date
Adam Bradley
e373db9eee update this to window, closes #1144 2014-04-17 20:44:31 -05:00
Tim Lancina
d8919269e8 set activeElement on focus 2014-04-17 14:50:43 -05:00
Adam Bradley
c587dec28f android textarea .cloned-text-input fix 2014-04-17 11:31:05 -05:00
Adam Bradley
ee1c8dc8b7 tap updates for select elements 2014-04-17 11:07:14 -05:00
Adam Bradley
43627f77c1 created containsOrIsTextInput 2014-04-17 09:49:08 -05:00
Adam Bradley
d0047cda44 refactor(tap): Refactor tap system for improved tap/click/keyboard/scroll/focus
Overhaul of the tap system so the keyboard does not cover up focused
inputs, correctly bring up the keyboard on text input focus, disabling
focus during scroll, disabling clicks after a hold then scroll,
removing 300ms delay without additional event handlers on each element,
etc. Refactored the tap/click/scroll/activator events for more
testability, along with adding more tests.
2014-04-17 08:26:25 -05:00
Andy Joslin
e75e20dc9d refactor: $animate - add $animateClassToggler to stop race conditions
Addresses #1100.

Fixes race conditions where $animate.{removeClass,hideClass} are
called simultaneously, in addition fixes any blinking that coulld be
caused by showing an element just attached to the dom.
2014-04-10 10:35:36 -06:00
Andy Joslin
98e7e3df46 refactor($ionicLoading,$ionicPopup): factor out common code, add tests
Also fixes $ionicLoading flickering on ios7 in beta.1.
2014-04-08 13:35:02 -06:00
Adam Bradley
8af018b1fa fix(scroll): Allow scrolling when touchstart target is an input, #1078 2014-04-08 14:28:12 -05:00
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