Closed Bug 1392303 Opened 3 years ago Closed 2 years ago

iOS 11: Bookmarks swipe-delete enabled on all items (not root-only)

Categories

(Firefox for iOS :: Data Storage, defect, P2)

Other
iOS
defect

Tracking

()

VERIFIED FIXED
Iteration:
1.29
Tracking Status
fxios 9.0 ---

People

(Reporter: garvan, Assigned: garvan)

References

Details

(Whiteboard: [MobileCore])

Attachments

(1 file)

55 bytes, text/x-github-pull-request
jhugman
: review+
Details | Review
Deleting bookmarks in the table view should only be enabled in the root view.
On iOS 11, I can swipe on any item, in any subfolder also, and get delete mode.
Assignee: nobody → gkeeley
Confirmed this is swipe-delete only behaviour, long-press context menu doesn't offer deletion.
Not fixed in beta 6. 

Filed apple bug 34006800

---------------------------------
Summary:
Returning a delete action from editActionsForRowAt  and a .none style for editingStyleForRowAt, the row will be incorrectly deletable. iOS 8,9,10 did not have this behaviour.

Steps to Reproduce:
Implement both functions:
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCellEditingStyle 

Returning a delete action from editActionsForRowAt  and a .none style for editingStyleForRowAt.

Expected Results:
As per previous iOS, the editingStyleForRowAt returning .none should result in no delete action shown when swiping on a cell.

Observed Results:
Can swipe delete to show edit button on rows.

Version:
iOS 11 xcode9 beta 5

Notes:
Quick repro: create a project in xcode of master-detail view controller type, and paste this code into MasterViewController.swift

override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
        let delete = UITableViewRowAction(style: UITableViewRowActionStyle.default, title: "Delete", handler: { (action, indexPath) in
        })
        return [delete]
}

override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCellEditingStyle {
        return .none
}

Run the project and swipe delete on a cell. The '.none' type of editing style is ignored, and swipe shows the delete button on a cell.
Iteration: --- → 1.29
Blocks: ios11
Drop it in http://openradar.appspot.com/, Garvan?
Flags: needinfo?(gkeeley)
Flags: needinfo?(gkeeley)
Priority: -- → P2
it is now very close to the release date for iOS 11, so I am pushing up a fix in for this in bit. I'll still file on openradar just so others are aware the API behaviour has changed.
Attached file Pull request
Attachment #8902796 - Flags: review?(jhugman)
Attachment #8902796 - Flags: review?(jhugman) → review+
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
On latest v8.x and v9.x builds, I'm no longer able to swipe-to-delete bookmarks inside the "Desktop Bookmarks" folder
Status: RESOLVED → VERIFIED
Whiteboard: [MobileCore]
You need to log in before you can comment on or make changes to this bug.