Commit Graph

49 Commits

Author SHA1 Message Date
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
473076b410 re-add larger release tolerance for buttons fix
#1378
https://github.com/driftyco/ionic/commit/1bfc85906f0b0a8839e22a4b8035890
c7099130c
2014-05-15 11:47:11 -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
1bfc85906f chore: revert tap tolerance fix for now 2014-05-14 16:35:08 -06:00
Adam Bradley
fab4a41d9a fix(scroll): larger release tolerance for buttons
Closes #1378
2014-05-14 13:08:21 -05:00
Adam Bradley
4f1145ca22 fix missing tagName for select checks 2014-05-14 09:57:30 -05:00
Adam Bradley
65749a40bb fix(select): select option in desktop Firefox
Closes #1251
2014-05-13 13:30:32 -05:00
Adam Bradley
2736993083 feat(tap): Make TAP_RELEASE_TOLERANCE configurable
Setter for TAP_RELEASE_TOLERANCE so the default can be changed. Closes
#1362
2014-05-13 11:13:04 -05:00
Andrew Joslin
636ca94325 fix(e2e-tests): disable ionic-tap during e2e tests
Closes #1310
2014-05-13 07:04:09 -06:00
Adam Bradley
1a2e501f25 fix(tap): Normalize taps w/ pointer events also
Some browsers already remove the delay with certain settings, such as
the CSS property `touch-events: none` or with specific meta tag
viewport values. However, each of these browsers still handle clicks
differently, such as when to fire off or cancel the event (like
scrolling when the target is a button, or holding a button down). For
browsers that already remove the 300ms delay, consider Ionic's tap
system as a way to normalize how clicks are handled across the various
devices so there's an expected response no matter what the device,
platform or version. Additionally, Ionic will prevent ghostclicks which
even browsers that remove the delay still experience.
2014-05-12 15:13:44 -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
Adam Bradley
98ee7ee293 chore(log): use console.log instead of .debug
Console statements get removed during builds, but when testing IE 10
does not support console.debug.
2014-05-07 13:42:48 -05:00
Andy Joslin
425ba247e5 docs(tap): fix typos 2014-05-06 09:26:21 -06:00
Adam Bradley
3b5248f22b data-tap-disabled not data-prevent-default 2014-05-06 10:21:34 -05:00
Adam Bradley
8d65371996 docs(tap): Add tap docs 2014-05-06 10:09:22 -05:00
Andy Joslin
975b5fadc6 docs(tap): add WIP tap notes page 2014-05-05 10:50:50 -06:00
Adam Bradley
08bc005766 fix select element click tests 2014-05-01 12:45:12 -05:00
Adam Bradley
e3306293cc fix(select): Select options w/ mouse events, closes #1251 2014-05-01 12:37:21 -05:00
Adam Bradley
05a6d7cca6 fix(tap): input[file] clicks within ion-content, closes #1237 2014-05-01 08:54:13 -05:00
Adam Bradley
ae3318a081 refactor(keyboard): Scroll to inputs hidden by keyboard 2014-04-24 20:22:16 -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
Adam Bradley
8af018b1fa fix(scroll): Allow scrolling when touchstart target is an input, #1078 2014-04-08 14:28:12 -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
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
b1a7c1990a fix(toggle): Changed tap listener to use "release", closes #882 #881 2014-03-24 16:21:44 -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
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
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
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
4066682381 separate tap from poly to make it easier to avoid tap logic in the future 2014-03-12 22:28:10 -05:00