Closed Bug 1008354 Opened 11 years ago Closed 11 years ago

[B2G][Gaia][Email] Long pressing an email in the 'Edit' menu after a few check boxes have been filled, removes all check marks. contextmenu event's onHoldMenu handler will setEditMode(true) if already in edit mode, resetting state

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.4 affected)

RESOLVED FIXED
2.0 S1 (9may)
Tracking Status
b2g-v1.4 --- affected

People

(Reporter: dgomez, Assigned: jrburke)

References

Details

(Whiteboard: [flame-1.4-exploratory])

Attachments

(3 files)

Attached image Long_Press_Edit.jpeg
Description: When the user goes into the 'Edit' menu within the email app, selects a few emails by checking some of the check boxes, and then long presses one of the emails (selected or not), all the checked check boxes will become unchecked. Repro Steps: 1) Update a Flame to BuildID: 20140509000203 2) Launch the "Email" app. 3) Log into an email with a valid username and password that contains multiple emails. 4) Navigate to the 'Edit' page by pressing the check mark in the bottom right hand corner. 5) Select a few emails, but not all of them. 6) Long press on any email (can be a check-marked or non check-marked email). 7) Observe results. Actual: All check-marked emails become unchecked. Expected: The long pressed email becomes checked if it was previously unchecked or it becomes unchecked if it was previously checked. 1.4 Environmental Variables: Device: Flame 1.4 MOZ BuildID: 20140509000203 Gaia: f19735d288d9bf1c6ee0c0ecc7941421365037c7 Gecko: 33aff135dc42 Version: 30.0 Firmware Version: v10E Repro frequency: 5/5 See attached: Long_Press_Edit.jpeg,Logcat_Long_Press_Edit.txt
This issue DOES occur on Buri 1.4: 1.4 Environmental Variables: Device: Buri 1.4 MOZ BuildID: 20140508000201 Gaia: 4ce973ef0732b0d52cb043210db598aa176b2ce9 Gecko: 16ab7f6b18f8 Version: 30.0 Firmware Version: v1.2-device.cfg This issue DOES occur on Buri 1.3: 1.3 Environmental Variables: Device: Buri 1.3 MOZ BuildID: 20140501024001 Gaia: 667539f1ed4becc45b182a5f1046221d3eeb9e7c Gecko: 4b68615ea3e5 Version: 28.0 Firmware Version: v1.2-device.cfg This issue DOES occur on Buri 1.1: 1.1 Environmental Variables: Device: Buri 1.1 MOZ BuildID: 20140423041201 Gaia: 44a2ddf63373f8e95c784faf4ed4d60081699c61 Gecko: 952236c0493c Version: 18.0 Firmware Version: v1.2-device.cfg
Good find! Originally, we had a popup-menu triggered by long-press (via the 'contextmenu' event, same thing right-click produces on desktop). This was subsequently altered so that a long-press on a message would enter the edit mode and select it. Aside: If I recall correctly, a bug in platform behavior would also generate a 'click' event so that we would end up selecting/checking the message by default. However, we have some explicit _suppressClick logic that tries hard to stop that from happening (because it screwed up the popups), so I'm not entirely sure where that stands. We definitely no longer select/check the message on trunk. It is clearly a bug that a second long-press causes setEditMode() to re-trigger and clear the selected message state, so we should definitely fix that assuming we still want this long-press behavior. However, I think it's worth checking whether we still want it. Juwei, do we still want long-press on a message in the message list to enter edit mode? If so, do we want to be selecting the message that was long-pressed on? (Note that there currently may be :active/:hover styling issues causing a message to continue to look pressed when scrolling/etc. This is an APZ bug that is being worked and isn't something the email app can deal with.)
Flags: needinfo?(jhuang)
Summary: [B2G][Gaia][Email] Long pressing an email in the 'Edit' menu after a few check boxes have been filled, removes all check marks. → [B2G][Gaia][Email] Long pressing an email in the 'Edit' menu after a few check boxes have been filled, removes all check marks. contextmenu event's onHoldMenu handler will setEditMode(true) if already in edit mode, resetting state
No it looks like we don't need long pressing for accessing edit mode. Long press on a list should only call out a context menu rather than an edit mode. So in this case we won't need it. Andrew, please help to remove this behaviour. And also, long pressing an message in edit mode should not deselect all the checkbox, please remove this behaviour as well, thank you!!
Flags: needinfo?(jhuang)
Attached file GitHub pull request
This has been really bugging me while trying to do slow scroll tests, so went ahead and did the work to remove it. Removes the long press code for email. I opted to just remove all contextmenu stuff for cards too, since it is no longer used, thinking we would leverage the time machine knowledge in git to restore it if we needed it later.
Attachment #8431256 - Flags: review?(bugmail)
Assignee: nobody → jrburke
Target Milestone: --- → 2.0 S1 (9may)
Comment on attachment 8431256 [details] [review] GitHub pull request Thanks for making the bindContainerHandler changes! r=asuth by inspection
Attachment #8431256 - Flags: review?(bugmail) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: