Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Have the possibility of disabling system-context menu #279

Closed
nunodonato opened this issue Sep 28, 2012 · 9 comments
Closed

Have the possibility of disabling system-context menu #279

nunodonato opened this issue Sep 28, 2012 · 9 comments

Comments

@nunodonato
Copy link

I was just making some experiments with bbUI.js (which has its own implementation of the context menu), and bumped into this problem:

  • I was testing if the bbui overflow menu could be dragged like the cascades one.
  • As I pressed and hold for a few secs the system context menu poped up, allowing me to save/share the icon of the button!

For any user using a webworks app, this could be a terrible experience (and confusing)

Could the system context menu be totally disabled somehow, so that when using bbUI.js we use its own implementation?

cc @tneil

@nukulb
Copy link
Contributor

nukulb commented Sep 28, 2012

You can turn it off but I prefer if you turn off the bbui context menu and webworks fixes the context menu on button images

~Nukul

From: Nuno Donato [mailto:notifications@github.com]
Sent: Friday, September 28, 2012 04:37 PM
To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com
Subject: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

I was just making some experiments with bbUI.js (which has its own implementation of the context menu), and bumped into this problem:

  • I was testing if the bbui overflow menu could be dragged like the cascades one.
  • As I pressed and hold for a few secs the system context menu poped up, allowing me to save/share the icon of the button!

For any user using a webworks app, this could be a terrible experience (and confusing)

Could the system context menu be totally disabled somehow, so that when using bbUI.js we use its own implementation?

cc @tneilhttps://github.com/tneil


Reply to this email directly or view it on GitHubhttps://github.com//issues/279.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

@nunodonato
Copy link
Author

We are talking HTML here, I may be implementing my own UI, how is the context menu going to find out what's a button and what's a real image?
For me it makes more sense to keep it off as a default, and having the possibility of enabling it on a case by case basis

Sent from my BlackBerry

-----Original Message-----
From: Nukul Bhasin notifications@github.com
Date: Fri, 28 Sep 2012 16:59:14
To: blackberry/BB10-WebWorks-FrameworkBB10-WebWorks-Framework@noreply.github.com
Reply-To: blackberry/BB10-WebWorks-Framework reply@reply.github.com
Cc: Nuno Donatonunodonato@gmail.com
Subject: Re: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

You can turn it off but I prefer if you turn off the bbui context menu and webworks fixes the context menu on button images

~Nukul

From: Nuno Donato [mailto:notifications@github.com]
Sent: Friday, September 28, 2012 04:37 PM
To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com
Subject: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

I was just making some experiments with bbUI.js (which has its own implementation of the context menu), and bumped into this problem:

  • I was testing if the bbui overflow menu could be dragged like the cascades one.
  • As I pressed and hold for a few secs the system context menu poped up, allowing me to save/share the icon of the button!

For any user using a webworks app, this could be a terrible experience (and confusing)

Could the system context menu be totally disabled somehow, so that when using bbUI.js we use its own implementation?

cc @tneilhttps://github.com/tneil


Reply to this email directly or view it on GitHubhttps://github.com//issues/279.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.


Reply to this email directly or view it on GitHub:
#279 (comment)

@nukulb
Copy link
Contributor

nukulb commented Sep 29, 2012

We are working on this
@jeffheifetz - case by case use case is interesting for context menus
~Nukul

From: Nuno Donato [mailto:notifications@github.com]
Sent: Friday, September 28, 2012 05:12 PM
To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com
Cc: Nukul Bhasin
Subject: Re: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

We are talking HTML here, I may be implementing my own UI, how is the context menu going to find out what's a button and what's a real image?
For me it makes more sense to keep it off as a default, and having the possibility of enabling it on a case by case basis

Sent from my BlackBerry

-----Original Message-----
From: Nukul Bhasin notifications@github.com
Date: Fri, 28 Sep 2012 16:59:14
To: blackberry/BB10-WebWorks-FrameworkBB10-WebWorks-Framework@noreply.github.com
Reply-To: blackberry/BB10-WebWorks-Framework reply@reply.github.com
Cc: Nuno Donatonunodonato@gmail.com
Subject: Re: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

You can turn it off but I prefer if you turn off the bbui context menu and webworks fixes the context menu on button images

~Nukul

From: Nuno Donato [mailto:notifications@github.com]
Sent: Friday, September 28, 2012 04:37 PM
To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com
Subject: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

I was just making some experiments with bbUI.js (which has its own implementation of the context menu), and bumped into this problem:

  • I was testing if the bbui overflow menu could be dragged like the cascades one.
  • As I pressed and hold for a few secs the system context menu poped up, allowing me to save/share the icon of the button!

For any user using a webworks app, this could be a terrible experience (and confusing)

Could the system context menu be totally disabled somehow, so that when using bbUI.js we use its own implementation?

cc @tneilhttps://github.com/tneil


Reply to this email directly or view it on GitHubhttps://github.com//issues/279.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.


Reply to this email directly or view it on GitHub:
#279 (comment)


Reply to this email directly or view it on GitHubhttps://github.com//issues/279#issuecomment-8998920.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

@jeffheifetz
Copy link
Contributor

Custom context menus should be coming in webworks, we are discussing them already here - #184

As per dismissing it case by case this can be done by listening to the contextmenu event and preventing default. Thats what we do on the contextmenu code to prevent context menus on context menus.

The advantage to the webworks implementation vs bbui is that it will have deeper integration into the platform.

@nunodonato
Copy link
Author

Wouldn't it be easier to do the other way around? Assume no context menu and have the developer enable it when needed?
If I have to manually disable it for all potential elements that fire a context menu, that's a lot of work in each screen.

@jeffheifetz
Copy link
Contributor

I suppose if thats what you want, you can set blackberry.ui.contextmenu.enabled to false at the beginning and enable it in the event. You'll just need some sort of mechanism to disable it afterwards, perhaps just a timer would be good enough.

@ejzn
Copy link
Contributor

ejzn commented Oct 2, 2012

@nunodonato you can actually catch the event yourself via oncontextmenu event attached to the dom, if you don't want to do what Jeff says. Try the following:

window.oncontextmenu = function(evt) {
evt.preventDefault();
};

You won't see anything, and you'll prevent us from acting on the event all together.

@nunodonato
Copy link
Author

Hi John

Yes I'm aware of that option, was just wondering about what would be the best default behavior.

Thanks!
Nuno

Sent from my BlackBerry

-----Original Message-----
From: Erik Johnson notifications@github.com
Date: Tue, 2 Oct 2012 08:43:38
To: blackberry/BB10-WebWorks-FrameworkBB10-WebWorks-Framework@noreply.github.com
Reply-To: blackberry/BB10-WebWorks-Framework reply@reply.github.com
Cc: Nuno Donatonunodonato@gmail.com
Subject: Re: [BB10-WebWorks-Framework] Have the possibility of disabling system-context menu (#279)

@nunodonato you can actually catch the event yourself via oncontextmenu event attached to the dom, if you don't want to do what Jeff says. Try the following:

window.oncontextmenu = function(evt) {
evt.preventDefault();
};

You won't see anything, and you'll prevent us from acting on the event all together.


Reply to this email directly or view it on GitHub:
#279 (comment)

@ejzn
Copy link
Contributor

ejzn commented Oct 5, 2012

@kwallis Can we close this as our product decision?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants