Skip to content
This repository

Fixes #2532955 - Touch events break when YUI.Charts are used #344

merged 1 commit into from over 1 year ago

3 participants

stonebk Eric Ferraiuolo tripp bridges

"touchend" events were being captured and halted globally -- instead, only halt when the event originated from the chart

Original pull request: #341

fixes #2532955 4d102e3
Eric Ferraiuolo

We should add a test case which verifies that events are fired when clicks or touches happen outside the chart. That way we can protect against future regressions. I'm sure @tripp will be fine with adding the test himself (and it might be easier for him to do so.)

Once the test is in, this LGTM.

tripp bridges

Yep. I'll add the test and run the suite against all the usual suspects. Barring any issues that arise, I'll merge this fix in.

tripp bridges tripp merged commit 4d102e3 into from
tripp bridges tripp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 19, 2012
fixes #2532955 4d102e3
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  src/charts/js/ChartBase.js
6  src/charts/js/ChartBase.js
@@ -611,7 +611,11 @@ ChartBase.prototype = {
611 611
                 Y.delegate("touchend", Y.bind(this._markerEventDispatcher, this), cb, markerClassName);
612 612
                 //hide active tooltip if the chart is touched
613 613
                 Y.on("touchend", Y.bind(function(e) {
-                    e.halt(true);
+                    //only halt the event if it originated from the chart
+                    if(cb.contains(
+                    {
+                        e.halt(true);
+                    }
615 619
616 620
617 621
                         this._activeMarker = null;

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.