Feature request: Lock popup window, keeping it from closing when losing focus

2,540 views
Skip to first unread message

ErikRothoff

unread,
May 21, 2012, 3:34:04 PM5/21/12
to Chromium-extensions
I have a feature request for Chrome extensions and wondering where I
should go with it.

I have an extension (https://chrome.google.com/webstore/detail/
pnjaodmkngahhkoihejjehlcdlnohgmp), it's basically an RSS reader within
the popup. Many of my users (including me) want to be able to read
feeds and not have to close the popup every time a new tab is created
from clicking a post. In Chrome < 19 this wasn't a problem for me (on
Mac OS X), since opening a new tab (chrome.tabs.create) from within
the popup didn't close it, letting me browse and read my feeds while
the popup was open. With Chrome 19 came a rewrite of the popup (I
assume) that makes it impossible to keep the popup open when opening
new tabs. Before 19 you could hack it by setting
chrome.tabs.create({selected: false, active: true}) or something like
that, but it didn't display the tab new tab. A corner case basically.

So my idea is to add a method to the chrome.browserAction object:

chrome.browserAction.lock() and
chrome.browserAction.unlock()

Which would keep the popup from closing when losing focus, and also a
method for unlocking it. So the user can navigate tabs, scroll on
pages and click on links and the popup wouldn't disappear. (When the
popup should closed is a bit vague still, perhaps add a X-button the
popup for force closing it) Only one popup can be visible at a time.

I have been talking to the developer of RSS Live Links too, (https://
chrome.google.com/webstore/detail/hcamnijgggppihioleoenjmlnakejdph)
who also has had to hack around the issue. With Chrome 19 has had to
make a complete work-around. I can think of other use cases for being
able to lock the popup, so I sincerely believe that there will be a
use for this.

Right now there are a couple of bug tickets for the popup and closing
when losing focus:
http://code.google.com/p/chromium/issues/detail?id=111094 Where most
people seem to agree that there should be some degree of control as to
when the popup should close
http://code.google.com/p/chromium/issues/detail?id=110377 Where the
opposite appears to be expected in Chrome OS, but I assume that its
because it doesn't work the same as on all the other platforms.

My question is also: Where do I go with this? I want to start a
discussion about adding more control to the browserAction popup, since
there is little-to-none right now, and it is seriously impeding the
developers and usability of the browserAction popup.

Thanks

Joshua Woodward

unread,
Jul 9, 2012, 1:16:46 PM7/9/12
to Robert Smith, chromium-...@chromium.org
I don't think that is the intention/design of the popup, to remain displayed.

You can, via script, inject a "popup" inside the page, like an overlay if your extension calls for it.

var overlay=document.createElement('div'); var oStyle=overlay.style; oStyle.position='absolute';
oStyle.backgroundColor='#fff"; oStyle.width='200px'; oStyle.height='400px'; oStyle.top='10px'; oStyle.right='10px'; oStyle.borderRadius='3px'; oStyle.border='1px solid #888'; document.body.appendChild(overlay); 

You can type that into the console on any page to see what it does. You will then have to manage when to hide it also.
Obviously style it how you like.

On Wed, Jul 4, 2012 at 10:31 PM, Robert Smith <robertd...@gmail.com> wrote:
I agree. I could really use a feature that allowed the user to lock the popup to stay open.

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/E2jCkY1PFPkJ.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.



--


Joshua Woodward

Reply all
Reply to author
Forward
0 new messages