Closed Bug 208601 Opened 21 years ago Closed 19 years ago

Services are non-functional in form fields

Categories

(Camino Graveyard :: OS Integration, defect, P3)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.0

People

(Reporter: ender_mb, Assigned: sfraser_bugs)

Details

(Keywords: fixed1.8, regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030530 Camino/0.7+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030530 Camino/0.7+

The summary says it all. Services (open selection in TextEdit, etc.) work
properly in the browser view, but are disabled in form controls (i.e. textboxes).

Reproducible: Always

Steps to Reproduce:
1. go to, say, the search field at the bottom of this page
2. type some text and highlight it
3. go to Camino>Services

Actual Results:  
all services are disabled

Expected Results:  
services menu options should be enabled

I'm running OS 10.1.5. I don't know if this affects Jaguar systems though.
Confirmed with Camino 2003060804 (this also happens with Mozilla). Also tested
in Safari to make sure other apps have this behavior.

Don't see any dups, in Camino or Mozilla reports.

Marking new, change any attributes if need be.
Status: UNCONFIRMED → NEW
Ever confirmed: true
BTW, this used to work in 0.7.
I am running 10.2.6 and this bug affects Jaguar as well.
10.3.6/recent nightly

a few quick tests off highlighting a porting of this page's URL shows that
"search in google" [safari], email->send to [mail.app], textedit-> new window
with current selection all worked properly (when the recieving app was already
open, as is the case in other apps).


Is the total breakage specific to pre-10.3.x?
(In reply to comment #4)
> 10.3.6/recent nightly
> 
> a few quick tests off highlighting a porting of this page's URL shows that
> "search in google" [safari], email->send to [mail.app], textedit-> new window
> with current selection all worked properly (when the recieving app was already
> open, as is the case in other apps).
> 
> 
> Is the total breakage specific to pre-10.3.x?

This bug is about html form widgets in the page itself, not the url bar. the url
bar is a native text box and will automatically respond to services.

gotcha.. yes thats what i see...

its as if the menu doesn't realize there's a selection made.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → Camino1.0
Still broken on 2005072608. Not sure this meets 1.0 criteria though (whatever
that may be). Is the number of people that use the services menu (or would use
it) great enough that this should be fixed by 1.0?
As noted in comment 2, this is a regression between 0.7 and 0.7+ (20030530).

We see posts about this periodically in the forums, and it is a long-standing
regression; it's also an inconsistency because services work everywhere else in
Camino.

Depending on what it would take to fix this, it might be something to leave on
the list and then bump at the end if it doesn't make it.
Keywords: regression
(In reply to comment #7)
> Still broken on 2005072608. Not sure this meets 1.0 criteria though (whatever
> that may be). Is the number of people that use the services menu (or would use
> it) great enough that this should be fixed by 1.0?

Enough times I've had this happen that it's rather annoying. Of course through
experience I've stopped reaching for the Services menu and just do copy/paste,
but esp since this is a reg, this would make a lot of sense to be done before 1.0
This is broken because DocumentViewerImpl::GetCanGetContents() is looking at the
wrong selection (that for the document, rather than the text field) and
concluding that the selection is collapsed.

I see a couple of ways to fix this:
  Add a method to nsIPresShell called CanGetContents() that grabs the correct
  selection (since nsIPresShell::DoGetContents() already does this)
or
  add an implementation of cmd_getContents to the editor, which will get it
  first and do the right thing.
Or I could just expose PresShell::GetSelectionForCopy() in nsIPresShell.
Simon, I'm not really familiar enough with the selection/editor setup to judge
which of those approaches is better....
Neither am I. If you can't find anyone who is, I'll look at the code.
DocumentViewerImpl::GetCopyable() is broken when the focus is in a textarea
(since it only looks at the selection of the document, not the (different)
selection of the text input. So we have to get the correct selection based on
focus, which is what PresShell::GetSelectionForCopy() does.

So I have have to have the docViewer call presShell->GetSelectionForCopy(), or I
need to add nsIPresShell::CanCopy() or somesuch. It seems that exposing
GetSelectionForCopy() in nsIPresShell is the best solution.
(In reply to comment #14)
> So I have have to have the docViewer call presShell->GetSelectionForCopy(), or I
> need to add nsIPresShell::CanCopy() or somesuch. It seems that exposing
> GetSelectionForCopy() in nsIPresShell is the best solution.

I agree. Make it so!
This patch exposes nsPresShell::GetSelectionForCopy() in nsIPresShell, and
changes GetCopyable() and GetCanGetContents() to use it (these methods do the
same thing). I added comments in a couple of other places that should probably
use it, but I want to keep the patch safe for the branch.
Attachment #194079 - Flags: superreview?(roc)
Attachment #194079 - Flags: review?(roc)
Attachment #194079 - Flags: superreview?(roc)
Attachment #194079 - Flags: superreview+
Attachment #194079 - Flags: review?(roc)
Attachment #194079 - Flags: review+
Comment on attachment 194079 [details] [diff] [review]
Patch to expose and use nsIPresShell::GetSelectionForCopy()

Requesting 1.8b4 approval. This is a regression, and Camino needs it. Camino is
the only user of this API, so it's a safe fix.
Attachment #194079 - Flags: approval1.8b4?
Checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #194079 - Flags: approval1.8b4? → approval1.8b4+
Please get this verified on the trunk and then landed on the branch. Time is
short for beta.
Checked in on the branch.
Keywords: fixed1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: