Last Comment Bug 116114 - Links from Address Cards must have same behaviour as for links from MailNews
: Links from Address Cards must have same behaviour as for links from MailNews
Status: RESOLVED FIXED
: dataloss
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Address Book & Contacts (show other bugs)
: Trunk
: x86 All
: -- enhancement (vote)
: seamonkey2.1b2
Assigned To: Philip Chee
: Ninoschka Baca
Mentors:
Depends on:
Blocks: 543293
  Show dependency treegraph
 
Reported: 2001-12-19 15:43 PST by Tobias B. Besemer [:BesTo] (QA)
Modified: 2011-01-19 01:21 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
example (57.84 KB, image/jpeg)
2001-12-19 15:49 PST, Tobias B. Besemer [:BesTo] (QA)
no flags Details
Proposed fix v1.0 use openAsExternal() (3.72 KB, patch)
2010-12-13 02:56 PST, Philip Chee
neil: feedback+
Details | Diff | Splinter Review
Patch v1.0a use inline-block on the img element instead. f=Neil (3.81 KB, patch)
2010-12-13 10:17 PST, Philip Chee
neil: review+
philip.chee: feedback+
Details | Diff | Splinter Review
Screenshot of centred image. (10.19 KB, image/png)
2010-12-13 10:19 PST, Philip Chee
no flags Details
Patch v1.0b As checked-in. (3.81 KB, patch)
2010-12-14 03:07 PST, Philip Chee
no flags Details | Diff | Splinter Review

Description Tobias B. Besemer [:BesTo] (QA) 2001-12-19 15:43:32 PST
Right-click on a link to choose "open in new windows" should be possible in a
card on the e-mail-list.

I make a attachment to explain which links I mean.
Comment 1 Tobias B. Besemer [:BesTo] (QA) 2001-12-19 15:49:08 PST
Created attachment 62263 [details]
example
Comment 2 Ninoschka Baca 2001-12-19 16:21:28 PST

*** This bug has been marked as a duplicate of 64030 ***
Comment 3 Ninoschka Baca 2002-01-07 14:16:23 PST
Verified duplicate.
Comment 4 :Hb 2009-10-13 04:40:05 PDT
> *** This bug has been marked as a duplicate of bug 64030 ***

The right-click issues from 64030 are not related.

Main goal of this one is to open links from the address cards without overwriting existing content. So they need to be opened in a new browser window or new tab. 

Links from MailNews are targeted according to the "Links from other applications" preference set in Tabbed Browsing. Additionally they watch Ctrl+Click, Middle-Click and Right-Click -> Context-Menu.

Links from Address Book should do the same.

Old summary: [RFE] right-click\"open in new window" should be possible on links in a card displayed in the e-mail-list
Comment 5 Philip Chee 2010-12-09 08:31:52 PST
Currently openLink(id) calls openTopWin() however it should call openUILink() instead now that we have this utility function.
Comment 6 Philip Chee 2010-12-13 02:56:19 PST
Created attachment 497237 [details] [diff] [review]
Proposed fix v1.0 use openAsExternal()

Currently openLink(id) calls openTopWin() however it should call openAsExternal()


> -        <hbox style="min-width: 10ch; max-width: 10ch;">
> +        <hbox style="min-width: 10ch; max-width: 10ch; display: inline-block"> 

I got tired of getting this error message in the Error Console every time I tested this patch:

> Warning: XUL box for hbox element contained an inline img child, forcing all its children to be wrapped in a block.
> Source file: chrome://messenger/content/addressbook/addressbook.xul

So I decided to fix it here rather than in a separate bug/patch since it's a one liner.

>            <description class="CardViewLink" id="cvHomeWebPageBox">
> -            <html:a onclick="return openLink('cvHomeWebPage');" href="" id="cvHomeWebPage"/>
> +            <html:a onclick="return openLink(event);" href="" id="cvHomeWebPage"/>
>            </description>

I don't suppose it's worth while converting these to a text-link label + .textContent
Comment 7 neil@parkwaycc.co.uk 2010-12-13 04:26:02 PST
Comment on attachment 497237 [details] [diff] [review]
Proposed fix v1.0 use openAsExternal()

[Bah, this crashed my debug build. Filed bug 618792.]

>+        <hbox style="min-width: 10ch; max-width: 10ch; display: inline-block">
>           <spacer flex="1"/>
This is no good, because the spacers won't flex. (You can't tell with the default image because it's too big and has to shrink to fit anyway.) Maybe setting display: -moz-box on the img will work. (I haven't tried it.)
Comment 8 Philip Chee 2010-12-13 10:17:08 PST
Created attachment 497276 [details] [diff] [review]
Patch v1.0a use inline-block on the img element instead. f=Neil

Switching review to Neil as IanN seems MIA.

>>+        <hbox style="min-width: 10ch; max-width: 10ch; display: inline-block">
>>           <spacer flex="1"/>
> This is no good, because the spacers won't flex. (You can't tell with the
> default image because it's too big and has to shrink to fit anyway.) Maybe
> setting display: -moz-box on the img will work. (I haven't tried it.)

-moz-box didn't work or rather it did but I still got the "inline img child" warning. Putting inline-block on the html:img however worked in that the image is centred horizontally and the warning doesn't crop up.
Comment 9 Philip Chee 2010-12-13 10:19:22 PST
Created attachment 497278 [details]
Screenshot of centred image.
Comment 10 neil@parkwaycc.co.uk 2010-12-13 13:22:46 PST
Comment on attachment 497276 [details] [diff] [review]
Patch v1.0a use inline-block on the img element instead. f=Neil

I'd prefer display: block; if it works.
Comment 11 Philip Chee 2010-12-14 03:07:45 PST
Created attachment 497490 [details] [diff] [review]
Patch v1.0b As checked-in.

Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/83dfe09bf8ff

> I'd prefer display: block; if it works.
Yes. display: block; works.

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