| Summary: | [ipad] [Tree] Tree-item selection broken on ipad | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Tim Buschtoens <tbuschto> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | austin.riddle, jrlq, tbuschto | ||||
| Version: | 1.4 | ||||||
| Target Milestone: | 1.4 M7 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 320597, 323133 | ||||||
| Attachments: |
|
||||||
|
Description
Tim Buschtoens
Here is what I have so far: When the empty part of the cell is clicked, here is the sequence of events received in _filterMouseEvents in the MobileWebkitSupport (format is event.type [event.originalEvent]: mouseout[TouchEvent], mouseover[TouchEvent], mousedown[TouchEvent] When the label is clicked: mouseout[TouchEvent], mouseover[TouchEvent],mouseover[undefined], mousemove[undefined], mousedown[undefined]. For the cases where the original event is undefined, event.preventDefault() is called. I think this is why we don't get the touch end. Now I suppose I need to figure out what is causing these undefined originalEvents. (In reply to comment #1) This is happening on a stable "touch" using the iPad emulator. So the extra events are mysterious as well. If the originalEvent is undefined, that usually means this mouse-event was created by the browser in an effort to emulate the mouse. These events are mostly blocked because we emulate our own events. So either these are rap-emulated events which for some reason dont have the original event attached, or these are the browser-emulated events and for some reason the corrosponding TouchEvents are never received/fired. OK, so I figured out where the problem is coming from. Apparently the reuse of the divs in the tree is not playing well with safari. If I comment out element.innerHTML (TreeRow.js:347) the touch events will work. OR if I assign result.innerHTML (TreeRow.js:472) to some text or undefined, then the touch events work (although you now see things you don't want). If I set it to null or empty (as it is already) the touch events will not work properly. Created attachment 193409 [details]
Fix for Tree TouchEvent problems
Here is a fix for this bug. There was an issue with resetting the innerHTML to "" and then right after that setting it to the column text. I basically changed TreeRow.js to work more like TableItem.js where the properties are set outside of the call to get the cached node/div. In the case of TreeRow I reset the innerHTML for all cases accept the label, which will set the innerHTML to the column text.
Hm. Okay, seems to work, though i dont understand what the ipads problem here is. Unless you have an even better idea, commit it. Fixed in CVS HEAD. |