Commit Graph

29 Commits

Author SHA1 Message Date
Andrew
7ef9ad74cf fix(slidebox): refactor for performance and stability
Closes #2336. Closes #2317. Closes #2290. Closes #2228. Closes #2067.
Closes #1890. Closes #1865. Closes #1850. Closes #1755. Closes #1688.
Closes #1578. Closes #1501. Closes #1353. Closes #1342. Closes #782.
Closes #416. Closes #2288.

BREAKING CHANGE: The slideBox's API has undergone many changes.

- **`<ion-slide-box>`** attributes have changed (see
  [documentation](http://ionicframework.com/docs/api/directive/ionSlideBox)):

  * `active-slide` has changed to `selected`. Change your code from
  this:

    ```html
    <ion-slide-box active-slide="activeSlideIndex"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box selected="activeSlideIndex"></ion-slide-box>
    ```

  * `does-continue` has changed to `loop`.  Change your code from this:

    ```html
    <ion-slide-box does-continue="shouldLoop"></ion-slide-box>
    ```

    To this:

    ```html
    <ion-slide-box loop="shouldLoop"></ion-slide-box>
    ```

  * `auto-play` and `slide-interval` have been merged into `auto-play`.
  Change your code from this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="true" slide-interval="1000">
    </ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false" slide-interval="1000">
    </ion-slide-box>
    ```

    To this:

    ```html
    <!-- autoPlay is on -->
    <ion-slide-box auto-play="1000"></ion-slide-box>
    <!-- autoPlay is off -->
    <ion-slide-box auto-play="false"></ion-slide-box>
    ```

  * `show-pager` and `pager-click` have been removed. Use
  a child `<ion-slide-pager>` element. See the [`ion-slide-pager`
  documentation](http://ionicframework.com/docs/api/directive/ionSlidePager).
  Change your code from this:

  ```html
  <!-- pager using default click action -->
  <ion-slide-box show-pager="true">
  </ion-slide-box>
  <!-- pager with custom click action -->
  <ion-slide-box show-pager="true" pager-click="doSomething(index)">
  </ion-slide-box>
  ```

  To this:

  ```html
  <ion-slide-box>
    <!-- pager using default click action -->
    <ion-slide-pager></ion-slide-pager>
  </ion-slide-box>
  <ion-slide-box>
    <!-- pager with custom click action -->
    <ion-slide-pager ng-click="doSomething(index)"></ion-slide-pager>
  </ion-slide-box>
  ```

- **`$ionicSlideBoxDelegate`** methods have changed (see
  [documentation](http://ionicframework.com/docs/api/service/$ionicSlideBoxDelegate)):

  - `update()` has been removed. slideBox updates on its own now.

  - `stop()` has been removed. See `autoPlay()` below.

  - `start()` hass been removed. See `autoPlay()` below.

  - `slide(newIndex[, speed])` has been renamed to `select(newIndex[,
    speed]);

  - `currentIndex()` has been renamed to `selected()`.

  - `slidesCount()` has been renamed to `count()`.

  - New method `$ionicSlideBoxDelegate.autoPlay()`. Change your code
    from this:

    ```js
    // stop auto sliding
    $ionicSlideBoxDelegate.stop();
    // later... start auto sliding
    $ionicSlideBoxDelegate.start();
    ```

    To this:

    ```js
    var autoPlaySpeed = 3000; //wait 3000 seconds between changing slide
    // stop auto sliding
    $ionicSlideBoxDelegate.autoPlay(false);
    // later... start auto sliding
    $ionicSlideBoxDelegate.autoPlay(autoPlaySpeed);
    ```

  - `previous()` now returns the index of the previous slide and does
    not select. Change your code from this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.previous();
    ```

    To this:

    ```js
    // select previous slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.previous() );
    ```
  - `next()` now returns the index of the next slide and does
    not select. Change your code from this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.next();
    ```

    To this:

    ```js
    // select next slide
    $ionicSlideBoxDelegate.select( $ionicSlideBoxDelegate.next() );
    ```
2014-10-08 11:09:15 -06:00
Adam Bradley
caf1272186 fix(scroll): remove isContentEditable from ignoreScrollStart
If an element isContentEditable, do not ignoreScrollStart incase users
are using contenteditable elements to scroll. This may have originally
been put in because it disabled text selection, and moving the text
cursor on touch. But this doesn’t seem to be the case anymore, so it
may have been put in for platform versions we no longer support. Also
fix the data-prevent-scroll dataset attribute. Closes #2091
2014-08-29 23:35:07 -05:00
Adam Bradley
df57858521 fix(menuContent): gestures do not stop_browser_behavior
The gestures which were being added to side menu content were also
adding the `disable-user-behavior` class, which disabled
contenteditable elements. Now passing in the gesture option
stop_browser_behavior=false, along with adding the options param to the
gestures service. Fixes #421
2014-08-29 22:25:55 -05:00
Perry Govier
840c014b27 fix(item): clicks climb 5 levels looking for an item to activate, but not 6. Fixes #1921 2014-08-19 14:20:35 -05:00
Adam Bradley
944d2595af fix(sideMenu): fix stopping content scrolling
When a list was within a side menu it could scroll up and down, but if
the user happened to drag a little bit on the X axis, then it would try
to open the side menu and the Y scroll of the content stopped. Closes
#1541
2014-08-07 12:22:28 -05:00
Perry Govier
889482e048 fix(tap): fire input behavior when tap/clicking file input label. Closes #1699 2014-07-02 18:27:07 -05:00
Adam Bradley
2e3b854658 fix(tap): get containing label of deeply nested element
The `tapContainingElement` method was not working correctly to climb up
the DOM of a clicked element to potentially find an ancestor label
element. Closes #1643
2014-06-18 15:03:52 -05:00
Tim Lancina
ad08b341ce fix(keyboard):don't setKeyboardShow on date/time inputs
Closes #1638.
2014-06-18 14:33:34 -05:00
Adam Bradley
e5b81c3bee test(tap): update tests so nodeType exists 2014-06-16 15:28:42 -05:00
Adam Bradley
7059b818ce fix(tap): select tag not working in IE
Cannot prevent default on mousedown in IE when the target is an option
or select element. Closes #1435
2014-05-20 09:13:17 -05:00
Adam Bradley
da0c798ce5 test(tap): updates for release tolerance changes 2014-05-16 14:40:40 -05:00
Adam Bradley
29ee640701 fix(click): fix mouseup click for ion-option-button
To allow select elements to change options in Firefox, the simulated
tap click should not go through when the target is an `option` element.
However, the regex was too general and also prevented
`ion-option-button` on mouseup.
2014-05-15 09:43:20 -05:00
Andrew Joslin
0ed975124d test(tap): expect falsy instead of false 2014-05-14 08:41:24 -06:00
Andrew Joslin
3c15b118ca fix(activator): properly activate elements nested inside an item.
Addresses #1373.

Before: if an `<a>`, `ng-click`, or `<button>` inside of a .item,
was clicked, the activator would walk up .item and activate it.

Now:  If an `<a>`, `ng-click`, or `<button>` inside of a
.item is clicked, the activator will activate that element.

Additionally, CSS was added so `a.item-content.activated` would look
activated.
2014-05-13 08:56:37 -06:00
Tim Lancina
b0cfe233a8 don't clear focusIn timer on focusOut 2014-05-09 11:39:34 -05:00
Tim Lancina
5be42bc3c7 add height=device-height on Cordova iOS 7.0 2014-05-09 09:17:04 -05:00
Adam Bradley
8730e62e62 fix(tap): Prevent different input focus after 300ms delay
If a text input is located in the same area as a button which was just
tapped, which was probably because of a view transition, the text input
gets focus 300ms later. This is an issue on Android because it also
fires off a mousedown event. Resolved by remembering the touchend
target then checking if it’s different from the mousedown target.
Closes #1370
2014-05-08 10:40:15 -05:00
Andrew Joslin
95d1aea4f1 chore(travis): re-enable jshint 2014-05-08 09:11:16 -06:00
Adam Bradley
08e4b3d95b feat(platform): added isWindowsPhone() method 2014-05-07 14:48:36 -05:00
Adam Bradley
6b3c2b929a merge keyboard-fixes 2014-05-03 22:30:21 -05:00
Adam Bradley
7cfa3a685d fix for viewport props w/ only key, no value 2014-05-02 10:50:02 -05:00
Adam Bradley
5f8e9040bd fix(viewport): Auto update viewport tag 2014-05-02 10:12:48 -05:00
Adam Bradley
08bc005766 fix select element click tests 2014-05-01 12:45:12 -05:00
Adam Bradley
05a6d7cca6 fix(tap): input[file] clicks within ion-content, closes #1237 2014-05-01 08:54:13 -05:00
Tim Lancina
2094d83c77 keyboardGetHeight tests 2014-04-30 16:29:28 -05:00
Adam Bradley
0ad10edefc fix(viewport): Remove height value on iOS browser 2014-04-30 14:04:32 -05:00
Tim Lancina
14782d47c6 keyboard tests quickfix 2014-04-28 16:21:01 -05:00
Adam Bradley
ae3318a081 refactor(keyboard): Scroll to inputs hidden by keyboard 2014-04-24 20:22:16 -05:00
Andy Joslin
608862c97e chore(build): add cloud e2e/unit tests 2014-02-21 11:22:23 -05:00