unify / unify

Unify Project
http://www.unifyjs.com
Other
152 stars 16 forks source link

500ms delay of queue flush on touchend really needed? #90

Closed dominikg closed 12 years ago

dominikg commented 12 years ago

in our qooxdoo fork qx.ui.core.queue.Manager does something that may cause unexpected behaviour in applications.

usually, Manager#flush is called immediatly when a "useraction" event is received. If the event is a 'touchend' though, the flush is delayed by a timeout for 500ms, and subsequent calls to flush are ignored until the delayed flush was executed.

A comment mentions qooxdoo bug 4033 and describes that this has been done to keep touchend -> click event chain intact. (ios devices fire a click event 300ms after touchend and dom manipulations between touchend and click could interfere).

Basically this means no layout updates for 500ms after each touchend. 500ms is an eternity on touch devices with scrollables and tappable buttons.

We should investigate if something breaks after we remove the delay (unify applications usually don't care for the 300ms late click event, instead we act on 'tap', which is fired directly from a touchend handler).

If we really need to wait for the click event because not doing so would break more than just that click event, we should add an additional click listener that executes the flush as soon as possible.

Subsequent calls to flush during that period should also not simply return without notice.

fastner commented 12 years ago

Yes, you're right, we don't use click events, so this 500ms delay is a performance loss. Meybe we should also remove "click" as event handler to prevent usage of it.

fastner commented 12 years ago

Fixed in qooxdoo branch in commit 250caa495f7215a2b1edf0e05e407d2738c3260e