Last Comment Bug 688745 - Opening website from RSS: "Open in new tab" not available in context menu
: Opening website from RSS: "Open in new tab" not available in context menu
Status: RESOLVED FIXED
[good first bug]
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: ---
Assigned To: Edmund Wong (:ewong)
:
Mentors:
: 463897 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-23 06:29 PDT by Sven C. Berger
Modified: 2012-01-22 20:21 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Screenshot (39.72 KB, image/png)
2011-09-30 12:41 PDT, Sven C. Berger
no flags Details
Added 'Open in New Tab' to RSS context menu popup. (v1) (2.34 KB, patch)
2011-12-19 19:32 PST, Edmund Wong (:ewong)
no flags Details | Diff | Review
Added 'Open in Browser' to RSS context menu popup. (v2) (1.48 KB, patch)
2011-12-20 23:51 PST, Edmund Wong (:ewong)
iann_bugzilla: review+
Details | Diff | Review
Added 'Open in Browser' to RSS context menu popup. (v3) (3.30 KB, patch)
2011-12-24 23:01 PST, Edmund Wong (:ewong)
ewong: review+
Details | Diff | Review
Added 'Open in Browser' to RSS context menu popup. (v4) (2.29 KB, patch)
2011-12-29 20:18 PST, Edmund Wong (:ewong)
iann_bugzilla: review+
mnyromyr: superreview+
Details | Diff | Review

Description Sven C. Berger 2011-09-23 06:29:32 PDT
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Firefox/6.0.2 SeaMonkey/2.3.3
Build ID: 20110902180055

Steps to reproduce:

1. Opening RSS Feed article
2. rightclicking on website URL


Actual results:

Context-menu only offers single function (copy URL)


Expected results:

additional function: "Open in new tab"
Comment 1 Philip Chee 2011-09-30 08:05:16 PDT
Hmm. Works for me with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20110930 SeaMonkey/2.7a1.

How are you "Opening RSS Feed article"? I tried from the preview pane and from the standalone message window.
Comment 2 Sven C. Berger 2011-09-30 12:41:58 PDT
Created attachment 563808 [details]
Screenshot

I think I used what is called the preview pane. I've uploaded a screenshot where the context menu is encircled in red.
Comment 3 Philip Chee 2011-10-01 09:40:27 PDT
Ah I thought you meant a URL *in* the feed content. Confirmed with:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20110930 SeaMonkey/2.7a1

For anyone who is interested in fixing this bug the context menu is in:
suite/mailnews/msgHdrViewOverlay.xul

See: function OpenBrowserWithMessageId() in:
suite/mailnews/mailContextMenus.js
For hints on how to implement this.
Comment 4 Edmund Wong (:ewong) 2011-12-19 19:32:15 PST
Created attachment 583049 [details] [diff] [review]
Added 'Open in New Tab' to RSS context menu popup. (v1)
Comment 5 Philip Chee 2011-12-20 10:50:21 PST
There is no need to invent a new function. Please use openAsExternal() so that the window/tab/background prefs are respected.

> +  <menuitem label="&openInNewTab.label;" accesskey="&openInNewTab.accesskey;" oncommand="OpenInNewTab(document.popupNode)"/>

I think this could work:
... oncommand= "openAsExternal(document.popupNode.getAttribute("value")"

> +<!ENTITY openInNewTab.label                "Open in New Tab">
> +<!ENTITY openInNewTab.accesskey            "T">
If you use openAsExternal() the url might open in a new window instead depending on the preferences, so I suggest "Open in Browser".
Comment 6 Edmund Wong (:ewong) 2011-12-20 23:51:22 PST
Created attachment 583409 [details] [diff] [review]
Added 'Open in Browser' to RSS context menu popup. (v2)
Comment 7 Ian Neal 2011-12-24 14:38:17 PST
Comment on attachment 583409 [details] [diff] [review]
Added 'Open in Browser' to RSS context menu popup. (v2)

Unfortunately, you got bit-rotted by Jens.

>+++ b/suite/locales/en-US/chrome/mailnews/msgHdrViewPopup.dtd
>+<!ENTITY openInBrowser.label               "Open in Browser">
>+<!ENTITY openInBrowser.accesskey           "p">
I think "O" would be a better accesskey here as it is available.

>+++ b/suite/mailnews/msgHdrViewOverlay.xul
>@@ -131,6 +131,9 @@
> 
> <menupopup id="copyUrlPopup">
>   <menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode)"/>
>+  <menuitem label="&openInBrowser.label;"
>+            accesskey="&openInBrowser.accesskey;"
>+            oncommand="openAsExternal(document.popupNode.getAttribute('value'))"/>
Nit: use ; at end of the ) within the oncommand.

I think "Open in Browser" should be the first option in the list, followed by Bookmark, followed by Copy Link.

r=me with those changes, probably worth getting a moa from Mnyromyr too
Comment 8 Edmund Wong (:ewong) 2011-12-24 23:01:49 PST
Created attachment 584247 [details] [diff] [review]
Added 'Open in Browser' to RSS context menu popup. (v3)
Comment 9 Philip Chee 2011-12-26 10:50:41 PST
Edmund, remember to ask for moa from Mnyromyr by using the sr? flag.
Comment 10 Edmund Wong (:ewong) 2011-12-29 20:18:16 PST
Created attachment 584913 [details] [diff] [review]
Added 'Open in Browser' to RSS context menu popup. (v4)
Comment 11 Ian Neal 2012-01-07 04:49:12 PST
*** Bug 463897 has been marked as a duplicate of this bug. ***
Comment 12 Edmund Wong (:ewong) 2012-01-22 20:21:30 PST
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/230f526f4fca

Note You need to log in before you can comment on or make changes to this bug.