Touches on toolbar buttons not working

Bug #1296469 reported by Robert Schroll
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu HTML5 UI SDK
Fix Released
Critical
Alexandre Abreu

Bug Description

The attached test case has a toolbar with a single button. Clicking it should add a note to the main page. On the desktop this works. On the device, it doesn't, whether in the browser or the HTML5 container.

This has only been tested on an emulator (r226). Other touches seem to work reliably, so I don't think this is an emulator issue. But if you try this and it works on an actual device, then it must be.

Related branches

Revision history for this message
Robert Schroll (rschroll) wrote :
Revision history for this message
Robert Schroll (rschroll) wrote :
Adnane Belmadiaf (daker)
Changed in ubuntu-html5-theme:
status: New → Triaged
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Try :

UI.button("button").click(function(e){
    e.stopImmediatePropagation();
    document.querySelector("#hello-page p").innerHTML += "Click! ";
})

Revision history for this message
Robert Schroll (rschroll) wrote :

That doesn't seem to work any better for me.

Are we sure that this is a duplicate of #1222874? That one talks about the events being executed in a surprising order, but here the event on the button isn't happening at all. This bug only occurs on the device, not on the desktop, but #1222874 doesn't note any difference between the two.

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Ok Robert, i'll wait for Alex input on this, Thanks!

Revision history for this message
Robert Schroll (rschroll) wrote :

I started looking into this more, and I noticed that items on the toolbar on the device only get touchstart and touchend events. I'm not sure why; other elements seems to get click events just fine. Perhaps this is related to the various event handling in #1222874.

In any event, all you need to do is add a handler for touchend as well as click. But this is exactly what UI.button().click() is doing. So I went back to try that again. And this time it works. Don't know what I did differently, but I must have screwed something up the last time.

So chalk this one up to user error.

I do notice that the back button doesn't work on the device (bug #1302284). I think this is because the code setting it up is only setting the click handler.

Changed in ubuntu-html5-theme:
status: Triaged → Invalid
Changed in ubuntu-html5-theme:
status: Invalid → In Progress
assignee: nobody → Alexandre Abreu (abreu-alexandre)
importance: Undecided → Critical
Revision history for this message
Robert Schroll (rschroll) wrote :

This may be the most schizophrenic bug I've ever been a part of :).

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

Robert: Indeed!

Changed in ubuntu-html5-theme:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.