Comments (3)
Let me explain how interactions work in ChUI. What you see on the desktop are CSS hover effects using the :hover pseudo element. There is no JavaScript involved, so no mousemove event is bound. On mobile there is a singletap event which is part of ChUI that is used to trigger a temporary touch state for elements. Scrolling is trigger by touchstart events on mobile browser, there I use singletap events for most user interactions. A singletap has a 130 millisecond delay. For widgets such as popups, popovers, navigation list, the action is also being executed on the singletap event. This means that in most cases a widget will get dispelled before the touched state can be display.
In an earlier version of ChUI I had implemented touched states with the touchstart event. However this resulted in visual messiness. For example, if the user tried to scroll, anything interact in the scroller would immediately should its touch state because of the touchstart event, even though it wasn't being executed. This cause a lot of confusion for users, so I drop it and adopted the present approach.
Please be aware that this is a mobile first framework. Desktop support is only there to make it easy for you to immediately see what you are producing for your mobile targets. It is not our intention that ChUI will be used for deployment as a desktop framework. That would require lots of workarounds and hack to make it work consistently across a large number of browsers and browser versions.
That said, if you see something that doesn't look right, please do post some visuals and let us know. There are always odd bugs that slip through our tests and we are eager to push forward improving ChUI to make it a platform for you to make great apps.
from chocolatechip-ui.
The first screenshot is an android emulated one, same in my android device, where the highlights are not shown
Second screenshot is simply desktop browser where the highlights are shown,
What I felt is, the highlights are good to see, but the touchmove event is not triggered even in the emulator. Is there any work around to bring the highlight behaviour on screen.
from chocolatechip-ui.
I see. Let me make this clear. There are no mouse move or touch move events being used to trigger hover states in ChUI. What you see on desktop is purely accomplished using the CSS pseudo-elements :hover. I have this limited though the ChUI detectors module to only be applied on desktop. The reason is this. Originally when the iPhone launched with iOS, there Websites with hover states lost that functionality. Several versions later both Apple and Google for Android updated their mobile browsers to recognize the CSS :hover states. However, The implementation on both platforms is very buggy. Once the user touches something with a CSS hover state, it stays stuck in that state, many times even after the user touches else where on the screen. This can lead to very messy looking states for your app and is very confusing for users.
In the case of the popover, please be aware that the popover is just a container for whatever elements you want to throw in there. That might be a stack of buttons, or an interactive list as in your case. Since you’re putting the content in, you can also write a bit of JavaScript to wire up some interactivity.
If the popup list has and id of “myPopupList”, you could try the following some event delegation:
$(this).addClass('selected');
setTimeout(function() {
$($this).removeClass('selected');
}, 500);
});
Fiddle with the values until you get what works for your target platform. Android may require a longer timeout because it is slower at firing the events.
Also, note if you use the $.eventStart variable, this will translate to touchstart on mobile. This means that in your case, if the popover list is scrollable, as soon as the user tries to scroll, there will also be a selected state display where they touched. That, my friend, is the problem with mobile browsers when trying to convey the equivalent of hover states.
For native operating systems, they have an advantage over us because they can operate in microseconds They can see when the user is starting to scroll or have the grace period to assume the user is about to scroll and cancel touch events on a scrollable content. In contrast we are operating in the world of their mobile browsers, which can be very slow and therefore not offer use enough time to trigger a scroll events and prevent a touch states. :-(
Robert Biggs
Product Director
ChocolateChip-UI
www.sourcebits.com
(415) 288-3697
Sourcebits, Inc.
211 Sutter Street. STE 200
San Francisco, CA 94108
On Apr 19, 2014, at 11:57 PM, Ajmal Sali [email protected] wrote:
The first screenshot is an android emulated one, same in my android device, where the highlights are not shown
Second screenshot is simply desktop browser where the highlights are shown,
What I felt is, the highlights are good to see, but the touchmove event is not triggered even in the emulator. Is there any work around to bring the highlight behaviour on screen.
—
Reply to this email directly or view it on GitHub.
from chocolatechip-ui.
Related Issues (20)
- Example navigation-backto: scroll always results entering detail page HOT 2
- Grid do not work on Safari (iPad) HOT 2
- Chocolatechipjs in its own repo HOT 2
- Back button not rendering correctly on WP8 HOT 3
- Phonegap iOS scrolling singletap hadling issues HOT 23
- $.UIEditList callback function when an item is deleted HOT 6
- data-goto not functioning in Firefox 34, 35 HOT 7
- Chocolatechip-ui app freezes after iOS unlock HOT 2
- Keyboard autofocus being triggered on input fields
- data-goto syntax in docs is wrong HOT 1
- Where do I find example for buttons? HOT 2
- Cannot read property 'classList' of null HOT 4
- chui 3.5.5 does not work on Android Jellybean (4.2) HOT 12
- chocolatechip-ui.json purpose? HOT 3
- $.UIDeletable cannot read property 'on' of undefined HOT 13
- $.UIGoToArticle() loses history between tabs HOT 12
- wp8 nokia lumia 520 "back button issue" HOT 5
- Low Memory Warnings HOT 6
- Error when using $.UIGoToArticle HOT 9
- Tabbar on Android - with scrolled content double click needed HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatechip-ui.