Closed
Bug 1153285
Opened 11 years ago
Closed 10 years ago
Put "Open In New Tab" back as a context menu item
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| fennec | + | --- |
People
(Reporter: aaronmt, Assigned: bnicholson)
References
Details
(Whiteboard: noteworthy)
Attachments
(1 file)
We should match Firefox for Android behaviour here, long tap on links, 'Open in New Tab' addTab() should open them in the background
| Assignee | ||
Updated•11 years ago
|
tracking-fennec: ? → +
Updated•11 years ago
|
Assignee: nobody → sarentz
Updated•11 years ago
|
Summary: Open in New Tab should open new tabs in the background → Open fro the WKWebView Action Sheet should open new tabs in the background
| Reporter | ||
Updated•11 years ago
|
Summary: Open fro the WKWebView Action Sheet should open new tabs in the background → Open from the WKWebView Action Sheet should open new tabs in the background
Comment 1•11 years ago
|
||
After looking at this for a while, mostly reading WebKit code, I don't think there is a simple solution for this that will not involve private APIs and patching UIKit/WebKit methods.
I think we should leave this menu as it is now and file a bigger bug for post v1 to re-implement it in our own code, fixing all the regressions that we encountered when we previously tried.
I am marking this as tracking-? so that we can discuss this during triage.
Comment 2•11 years ago
|
||
More technical:
Using the Open action from the action sheet that appears when you long press on a link results in the - webView:decidePolicyForNavigationAction:decisionHandler: being called.
But, from the WKNavigationAction we cannot see *how* that link was opened. We don't know if it was a regular tap on a link, or if the user went through the action sheet. We miss that context.
We can *maybe* hack around that by patching UIAlertView or WKWebView and inject our own code, but I think that is fragile and probably 'private API usage' in App Store terms.
Comment 4•11 years ago
|
||
st3fan, just to be clear what's the NavigationType for the decidePolicyForNavigation [1]? I would expect its Other, but your message makes it sound like its actually LinkActivated?
https://developer.apple.com/library/ios/documentation/WebKit/Reference/WKNavigationAction_Ref/index.html#//apple_ref/swift/enum/WKNavigationType
| Assignee | ||
Comment 6•10 years ago
|
||
I'll take a look at this.
Assignee: sarentz → bnicholson
Status: NEW → ASSIGNED
| Assignee | ||
Comment 7•10 years ago
|
||
Well, bad news: user content scripts are not injected into iframes, so we'll still have bug 1127606. It looks like we can't do much better than the first implementation we tried in bug 1109666.
| Assignee | ||
Comment 8•10 years ago
|
||
Not sure how I missed it, but Stefan pointed me to initWithSource:injectionTime:forMainFrameOnly:, which is exactly what I was looking for.
Summary: Open from the WKWebView Action Sheet should open new tabs in the background → Put "Open In New Tab" back as a context menu item
| Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8609653 -
Flags: review?(sarentz)
Comment 10•10 years ago
|
||
Comment on attachment 8609653 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/494
I tested a bunch. Works great! Just some questions in the PR comments.
Attachment #8609653 -
Flags: review?(sarentz) → review+
| Assignee | ||
Comment 11•10 years ago
|
||
Going to look into element highlighting/Open In Background as follow-ups.
https://github.com/mozilla/firefox-ios/commit/ab9b821104a4b32f067f7d4b8ae6d22f0c54e0b1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•10 years ago
|
Whiteboard: noteworthy
You need to log in
before you can comment on or make changes to this bug.
Description
•