Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem with showPopup
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
deng  
View profile  
 More options Nov 21 2006, 8:53 am
Newsgroups: mozilla.dev.tech.xul
From: "deng" <jsanjo...@gmail.com>
Date: 21 Nov 2006 05:53:31 -0800
Local: Tues, Nov 21 2006 8:53 am
Subject: Problem with showPopup
I have a strange problem with 'showPopup'. This is what I do:

1.- open a 'toolbaritem' by clicking on a button at Firefox toolbar
2.- one of the menuitem that appear has a 'oncontextmenu' event handler
that shows a popup menu using showPopup

After the popup shows if I click anywhere on firefox the popup and the
toolbaritem should be dismissed, instead of that they remain on the
screen and I have to close using the ESC key.

This is the code I use to open the popup:

onBookmarkContextMenu: function(event, id) {
document.getElementById("bookmarkPopup").showPopup(document.getElementById( id),

                                event.screenX + 6, event.screenY + 6, "popup", "bottomright",
"bottomright");

},

I add the eventhandler after creating the menuitem:

setAttribute("oncontextmenu", "dengGB.onBookmarkContextMenu(event, '" +
id + "'); return false;");

Any ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Nov 21 2006, 7:45 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Wed, 22 Nov 2006 00:45:33 +0000
Local: Tues, Nov 21 2006 7:45 pm
Subject: Re: Problem with showPopup

deng wrote:
>1.- open a 'toolbaritem' by clicking on a button at Firefox toolbar
>2.- one of the menuitem that appear has a 'oncontextmenu' event handler that shows a popup menu using showPopup

What's wrong with setting the contextmenu="bookmarkPopup" attribute? But
IIRC you need to use the "context" parameter, rather than the "popup"
parameter, for a context menu.

--
Warning: May contain traces of nuts.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Deng DongDong  
View profile  
 More options Nov 21 2006, 8:00 pm
Newsgroups: mozilla.dev.tech.xul
From: "Deng DongDong" <dongdongd...@hotmail.com>
Date: Wed, 22 Nov 2006 09:00:03 +0800
Local: Tues, Nov 21 2006 8:00 pm
Subject: Re:Problem with showPopup

Maybe you can use hidePopup() function

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。  http://www.hotmail.com  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
deng  
View profile  
 More options Nov 22 2006, 10:06 am
Newsgroups: mozilla.dev.tech.xul
From: "deng" <jsanjo...@gmail.com>
Date: 22 Nov 2006 07:06:18 -0800
Local: Wed, Nov 22 2006 10:06 am
Subject: Re: Problem with showPopup

Neil wrote:
> What's wrong with setting the contextmenu="bookmarkPopup" attribute?

I change the line:

setAttribute("oncontextmenu", "dengGB.onBookmarkContextMenu(event)");

with your suggestion:

setAttribute("oncontextmenu", "bookmarkPopup");

where 'bookmarkPopup' is the name of XUL declareated popup item.
Nothing happens. I tried too with:

setAttribute("oncontextmenu",
document.getElementById("bookmarkPopup"));

Nothing happens either. Keep in mind that I create the menuitem
dynamically in a javascript file.

> IIRC you need to use the "context" parameter, rather than the "popup"

I tried the "context" and "tooltip" flags on showPopup: same effect.

Thank you for your replay.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
deng  
View profile  
 More options Nov 22 2006, 10:09 am
Newsgroups: mozilla.dev.tech.xul
From: "deng" <jsanjo...@gmail.com>
Date: 22 Nov 2006 07:09:01 -0800
Local: Wed, Nov 22 2006 10:09 am
Subject: Re: Re:Problem with showPopup

> Maybe you can use hidePopup() function

hidePopup is my last option. I don't understand why as a programmer I
have to take care to close a popup. I rather think I am doing something
wrong.

Thank you.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
deng  
View profile  
 More options Nov 22 2006, 10:18 am
Newsgroups: mozilla.dev.tech.xul
From: "deng" <jsanjo...@gmail.com>
Date: 22 Nov 2006 07:18:33 -0800
Local: Wed, Nov 22 2006 10:18 am
Subject: Re: Problem with showPopup

> setAttribute("oncontextmenu", "bookmarkPopup");

Sorry Neil, I saw the error. I tried what you said:

setAttribute("context", "bookmarkPopup");

and yes the popup shows but the result is the same: the menuitem from
where the popup comes, stays in the screen, and a click on firefox will
not dismiss it. I am gonna have to use hidePopup.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
deng  
View profile  
 More options Nov 22 2006, 10:42 am
Newsgroups: mozilla.dev.tech.xul
From: "deng" <jsanjo...@gmail.com>
Date: 22 Nov 2006 07:42:30 -0800
Local: Wed, Nov 22 2006 10:42 am
Subject: Re: Re:Problem with showPopup

> Maybe you can use hidePopup() function

The best solution (the only I can find now), was DongDong idea: use
hidePopup.

Thank you again.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Deakin  
View profile  
 More options Nov 22 2006, 11:00 am
Newsgroups: mozilla.dev.tech.xul
From: Neil Deakin <enndea...@sympatico.ca>
Date: Wed, 22 Nov 2006 11:00:15 -0500
Local: Wed, Nov 22 2006 11:00 am
Subject: Re: Problem with showPopup

deng wrote:
>> Maybe you can use hidePopup() function

> hidePopup is my last option. I don't understand why as a programmer I
> have to take care to close a popup. I rather think I am doing something
> wrong.

> Thank you.

This is a bug that is currently scheduled to be fixed for 1.9

/ Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Nov 22 2006, 7:13 pm
Newsgroups: mozilla.dev.tech.xul
From: Neil <n...@parkwaycc.co.uk>
Date: Thu, 23 Nov 2006 00:13:19 +0000
Local: Wed, Nov 22 2006 7:13 pm
Subject: Re: Problem with showPopup

Neil Deakin wrote:
>deng wrote:

>>>Maybe you can use hidePopup() function

>>hidePopup is my last option. I don't understand why as a programmer I have to take care to close a popup. I rather think I am doing something wrong.

>This is a bug that is currently scheduled to be fixed for 1.9

I'm sorry that I didn't understand what the problem is; as far as I know
you can expand a bookmark folder on the personal toolbar and invoke a
context menu on one of its items without any apparent difficulty.

--
Warning: May contain traces of nuts.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »