Closed Bug 43936 Opened 25 years ago Closed 25 years ago

No context menus for XUL textfields

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: mozilla, Assigned: rubydoo123)

References

Details

(Keywords: verifyme, Whiteboard: [checked into trunk][rtm-])

Attachments

(4 files)

Right click does not produce a context menu in the URL bar for mousr-driven cut/copy/paste. This is now the *only* thing stopping me from using Mozilla as my regular browser. I know I have seen this, but I did no less than 8 different searches and could not find it.
i believe this is covered in bug 16081
I saw that, but it is only mentioned in a suggestion in one of the comments. I do not want this to get lost.
probably also the same as 42729. where there's a problem with tooltips, there's generally a problem with context menus.
petersen mentioned this at the end of bug 14874. I'll let him know it was split off. reassigning to law on a suggestion from brade
Assignee: pinkerton → law
Attached file XBL fix
OK I was able to get a context menu working for XUL text controls on Windows using XBL. I have attached the 3 required files and a text file describing the proper location for each file. There is a bug that causes a right click to not register for some XUL controls unless you double click, so if it doesn't work with one click the try double clicking.
*** Bug 48766 has been marked as a duplicate of this bug. ***
Bill, do we plan on implementing clipboard context menus for textfields globally? Seems like a good idea to me, but I'm not sure what that means in the way of customizablity (or the ability to turn off the menu for any given textfield). If not, I have a fix for just the URL bar.
this is really desirable if you want to have a "Go" button, which many themes are implementing. With a context menu in the url bar, you can paste in a url and click Go without ever touching the keyboard.
IMO, a basic context menu should apply to all text fields (Undo, separator, Cut, Copy, Paste, Delete, Select All). Individual text fields (e.g. the location field) may want to add other items onto the end of this menu (e.g. separator, Go), but that's a Futurable thing.
OS: Windows 2000 → All
Hardware: PC → All
*** Bug 52176 has been marked as a duplicate of this bug. ***
cc'ing hyatt for evaluation of the patch that dan attached.
I disagree on the futurability of this, at least on Windows. This is a ubiquitous and fundamental feature of text boxes on the Windows platforms. Even for me as an experienced user, it is disorienting to be left without the standard text box context menus.
Jerry Baker, I think you misinterpretted MPT. MPT> Individual text fields (e.g. the location field) may want to *add* _other items_ onto the end of this menu (e.g. separator, Go), but that [Go] is a Futurable thing.
man, how did this one slip through the cracks? hyatt/beppe, is Dan's patch acceptable?
Component: XP Toolkit/Widgets: Menus → Editor
Summary: No context menu in URL bar → No context menus for XUL textfields
Advice for location of these files in new skin hierarchy?
The patch I uploaded to this bug is wrong, and uses code that is unessary. I talked to Hyatt and he pointed me towards a much better solution. I will put together a new patch and upload it within the nex few hours.
The new patch I was working on does not seem to work in the recent nightly builds (It worked in the mid August builds). I've got an e-mail in to Hyatt to see if something has ghanged or is broken but I haven't heard back yet. I upload the patch as soon as get it functional.
*** Bug 53941 has been marked as a duplicate of this bug. ***
Be aware of the changes to XBL syntax: See news://news.mozilla.org/39AF09BA.394526D9%40netscape.com news://news.mozilla.org/39AF65F2.66DECFFC%40netscape.com and argument --is now--> parameter interface --is now--> implementation Look at, e.g., xulBindings.xml for more examples of current syntax (sorry, docs are scattered at the moment).
Attached file Contex Menu Fix
OK the file I just uploaded is a zip file that contains two .jar files. Simply extract these two files into the bin/chrome directory and you will now have a context menu in all XUL input elements including the autocomplete field.
*** Bug 54489 has been marked as a duplicate of this bug. ***
This patch kicks ass. The only thing is that context menus within XUL text boxes inside of a page have other crap on them (like Back and Forward). Of course they should not appear on text field context menus. Let's get this into the nightlies!
There is a small bug with this patch. If the clipboard contains something, it is pasted into the URL bar on right-click. This does not happen on text fields in pages.
*** Bug 56627 has been marked as a duplicate of this bug. ***
let's do this soon.
Keywords: mozilla1.0, ns601
*** Bug 57543 has been marked as a duplicate of this bug. ***
A patch for this bug has been around for nearly a month. Yet judging from the activity here, this bug seems to be lying dormant. What's the latest status on it? Can the mentioned problem with the patch be fixed and get this checked in?
dan6992@hotmail.com, the patches are appreciated, but it would be extremely helpful if you could post them in standard cvs diff -u format. Thanks!
Antony Mawer read Jerry Baker 2000-09-28 06:37 ... There is a small bug with this patch. If the clipboard contains something, it is pasted into the URL bar on right-click. This does not happen on text fields in pages. I guess it's time to triage that as if we had it checked in.
Keywords: patch, review
Whiteboard: [patch appears to disagree w/ location bar]
What's the problem with attaching one big plain text diff? I still can't properly open the attached .zip file.
There are 2 new files. If you want them sent in some other fassion, please pick it.
I only had to edit three files to make this change happen (autocomptete.xml, xulbindings.xml, and textcontext.dtd). All of my changes were XBL and XUL, there is no javascript and no native code, so nothing I did would cause the pasting bug some of you are describing. In fact I have this patch running on an early October build with no problems at all. So if this is in fact a problem in the newer builds then I will have to file a bug against Hyatt, since it would have to be something he did causing the problem. I'll have to grab a newer build and try it out before I do that though. I'll keep you posted. Dan
Well, there's certainly JS code in the .xml files. I suspect the problem is that there's code elsewhere that wants to paste to the url bar on right mouse click. Regardless, I'm reassigning this to Ben because I don't really know xbl and he'd be better able to appraise this code. I do have concern that this will only work for xul text fields. Is that correct? Don't we also want these context menus to work for html form controls? Will the fix for that interact badly with this code?
Assignee: law → ben
Context menus for HTML form controls is bug 16081. If it's possible to give context menus to both XUL and HTML textfields using the same code, that would obviously be much better than implementing them separately.
The most recent patch attached by timeless works and looks great! r=ben@netscape.com.
ok, well it wasn't my patch, so r=timeless, a=beng [per irc] and i'll commit now.
Assignee: ben → timeless
Status: NEW → ASSIGNED
Ok, it should be on trunk, there was a minor glitch that blake caught, i'm building now to see how it goes.
Whiteboard: [patch appears to disagree w/ location bar] → [checked into trunck]
*** Bug 57612 has been marked as a duplicate of this bug. ***
the context menu in the url bar is not working on mozilla-win32-talkback build (10-24-06), but is working on mozilla-win32 build.
removing ns601, that was my mistake. fwiw there was an issue w/ cvs-mirror, I know it upset the mac tinderboxes and it upset my personal builds so it was possible that some builds did not get this feature [they were stuck in a timewarp at about a day before the feature entered cvs]. I know it's really late for features, but this feature is two months old and is working on trunk. If anyone wants to mark this rtm++ i'll gladly commit to branch.
Keywords: ns601rtm
Whiteboard: [checked into trunck] → [checked into trunck][rtm+]
This will be a FBAI (Frequently Bitched About Item) if this doesn't make it into NS6, since without this, it will appear that you can't paste a new url into the url bar. It's working very well on the trunk.
rtm-, we believe the vast majority of users know how to use ctrl-V.
Whiteboard: [checked into trunck][rtm+] → [checked into trunck][rtm-]
Not arguing about it too much, but this is not a matter of whether there is a workaround. It is just one of the most basic possible functions for a text box in the Windows OS that users will expect it. I refer you to news://news.mozilla.org/8tfpja%24b1g3%40secnews.netscape.com. When it does not work, it appears that the application is broken, and not that it was a feature that did not make it into the product (most users won't know that the widgets are constructed by Mozilla itself).
I personally don't see why it's such a big deal to add 11 lines of XBL code to a couple of xml files! However considering it is only XBL, we could just add it to the skin instead. However if we do it that way then everyone who ever writes a skin will also have to remember to add the menu. Dan
I give up. If someone gets this rtm++ reopen. Have a nice day. verifyme
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Keywords: mozilla1.0, reviewverifyme
Resolution: --- → FIXED
Target Milestone: --- → mozilla0.9
I still don't get a context menu when in the URL field after highlighting the URL field.
Status: RESOLVED → REOPENED
QA Contact: jrgm → sujay
Resolution: FIXED → ---
reassigning to beppe to see who she wants to assign this bug to.
Assignee: timeless → beppe
Status: REOPENED → NEW
Whiteboard: [checked into trunck][rtm-] → [checked into trunk][rtm-]
I'll sr= if someone attaches diffs. However, I don't see a need for this to go into the rtm branch... I've been a windows user for years, and I had no idea until this very moment that there was a context menu on text fields...
"I had no idea until this very moment that there was a context menu on text fields" You are being sarcastic right? How else would you cut and paste except to use the keyboard or menus all the time?
alecf -- this is already checked into the trunk 10/23 by timeless. It has been punted by PDT for the branch. (Personally, I do use this context menu and would have liked it to make release, but not enough to push back). I'm not sure what sujay intended by reopening.
thanks for the effort timeless, but Ir eally don't think this is an RTM-level bug, esp. since it includes new strings. sujay: this is a trunk-only bug. Please only reopen if the trunk isn't working as advertised.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
and jerry, there was no sarcasm on my part, believe it or not I guess I just got used to Shift-Delete, Shift-Insert, etc...
*** Bug 64839 has been marked as a duplicate of this bug. ***
*** Bug 64839 has been marked as a duplicate of this bug. ***
verified in 1/30 build.
Status: RESOLVED → VERIFIED
Mass removing self from CC list.
Now I feel sumb because I have to add back. Sorry for the spam.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: