Last Comment Bug 697125 - Attachments: single attachment opens on single click, multiple attachments need double click
: Attachments: single attachment opens on single click, multiple attachments ne...
Status: RESOLVED FIXED
: ux-consistency
Product: Thunderbird
Classification: Client Software
Component: Message Reader UI (show other bugs)
: 7 Branch
: x86 Windows XP
: -- normal (vote)
: Thunderbird 17.0
Assigned To: Jim Porter (:squib)
:
:
Mentors:
: 812126 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-25 08:31 PDT by DutchGemini
Modified: 2013-01-04 13:55 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Ignore double-clicks on the attachment bar (2.43 KB, patch)
2012-08-10 21:10 PDT, Jim Porter (:squib)
bwinton: review+
bwinton: ui‑review+
Details | Diff | Splinter Review

Description DutchGemini 2011-10-25 08:31:36 PDT
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Avant Browser; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)

Steps to reproduce:

I received a message with either a single or with multiple attachments.


Actual results:

If there is a single attachment then you only click once to open, but if there are multiple then you need to open the indicator (goes also with single click) and then you must doubleclick on each attachment to open it. If you doubleclick on a single attachment, 2 instances of the handling application start (eg. Acrobat Reader) showing the *same* attachment.


Expected results:

I expected to use a doubleclick only also for opening single attachment. This is consistent with the rest of Windows.
Comment 1 Jim Porter (:squib) 2011-10-25 09:45:09 PDT
This isn't a question of consistency (at least not in the way you're suggesting). Double-clicking to open is usually used in file explorer-like widgets, which the collapsed attachment bar is not. In fact, there's no reason to ever select the single attachment in the collapsed bar, since you wouldn't be able to do anything with it even if it were selected. Thus, we just make the single click action be "open". The current way is actually more consistent with other related UI, e.g. the message header.

I suppose it's technically possible to ignore double-clicks so that people can double-click to their heart's content without opening spurious windows, but I don't think we should just do nothing on single-click.

Blake, ideas on this?
Comment 2 DutchGemini 2011-10-26 02:43:42 PDT
To recap:

- with a single attachment, the bar indicates '1 attachment:' followed by the name followed by the size
- with multiple attachments, the bar indicates 'x attachments' followed by the size
- a single click expands/collapses the attachments bar
- a single click on the attachment count caption 'x attachment(s)' does nothing
- a single click on the size caption 'xxx KB' does nothing
- a single click *BETWEEN* the attachment count caption and the file name or size caption expands the bar

here's the 'anomaly' when there is a single attachment with the name on the bar:
- the name of the file is not indicated as 'clickable' (highlight, underline, mouse pointer, etc.)
- a single click on the name of the file opens the file
- when the bar is open, you need a double click to open the file from the list of attachments but only a single click if using the name on the bar
Comment 3 Magnus Melin 2011-10-26 07:00:01 PDT
I've been fairly surprised by this too, and keep double-clicking which leads to opening multiple instances of the document :(

I don't know if this should be compared to other parts of the ui, as this part actually brings up another application, which is not the case elsewhere.
Comment 4 Jim Porter (:squib) 2011-10-26 08:13:50 PDT
(In reply to DutchGemini from comment #2)
> here's the 'anomaly' when there is a single attachment with the name on the
> bar:
> - the name of the file is not indicated as 'clickable' (highlight,
> underline, mouse pointer, etc.)

Yes it is. Mousing over the filename highlights it just like when you mouse over an email address.
Comment 5 DutchGemini 2011-10-27 02:37:15 PDT
You are right. It was not doing so because I'm using the "Office Black 1.6.6" skin, with the "Default 7.0.1" skin it indeed highlights. Will need to contact the maker of it.
Comment 6 Jim Porter (:squib) 2012-08-10 21:10:38 PDT
Created attachment 651082 [details] [diff] [review]
Ignore double-clicks on the attachment bar

Ok, this patch ignores double-clicks when you click on the attachment name in the attachment bar. That way, people can double-click or single-click and get the same result.
Comment 7 Blake Winton (:bwinton) (:☕️) 2012-08-15 08:33:07 PDT
Comment on attachment 651082 [details] [diff] [review]
Ignore double-clicks on the attachment bar

>+++ b/mail/base/content/msgHdrViewOverlay.js
>@@ -2423,16 +2423,33 @@ function addAttachmentToPopup(popup, att
> /**
>+ * Open an attachment from the attachment bar.
>+ *
>+ * @param event the event that triggered this action
>+ */
>+function OpenAttachmentFromBar(event)
>+{
>+  if (event.button == 0) {
>+    // Only open on the first click; ignore double-clicks so that the user
>+    // doesn't end up with the attachment opened multiple times.
>+    if (event.detail == 1)
>+      TryHandleAllAttachments('open');
>+    RestoreFocusAfterHdrButton();
>+    event.stopPropagation();
>+  }
>+}

That seems better.  ui-r=me.
And the code looks good, too.  r=me.

Thanks,
Blake.
Comment 8 Jim Porter (:squib) 2012-08-15 22:55:07 PDT
Checked in: http://hg.mozilla.org/comm-central/rev/e50828052087
Comment 9 Jim Porter (:squib) 2013-01-04 13:55:11 PST
*** Bug 812126 has been marked as a duplicate of this bug. ***

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