if you click on the browser button, appears a page as a popup page.
with my program you can turn on music, from the body of the page.
when the window appears, music can be turned on, but when the window goes away, music is stopped.
does anyone have an idea how it stays turned, without popup appeared to stay?
Indeed when the popup goes away everything gets torn down.
Depending on how you play the music it might not be available in the background page either. Good luck.
Related
In FireFox extensions, the Panel/Popup that opens on the Toolbar sizes itself outside the browser window, if needed, so that we see every populated elements in the panel. In Chrome however, the popup/panel is only drawn until the browser window's boundaries. So, if the user resizes the browser window small enough, you don't see the entire popup.
I checked the documentation and couldn't find anything. Is there anything that can be done to show the entire popup?
This seems to be OS-dependent (can be reproduced on Linux and Win7, but not Win10).
As an extension author, there is nothing you can do to control it, this is just how the browser renders its content. You could submit a bug report.
I use modal on my website to display youtube videos and all is working good.
But, when I start a video (then I stop it) and I close the modal, I have strange effects on my main menu that has a hover changing effects.
This is a sample video:
And then after closing and go with the mouse hover the menu this appears (on the 2 links that are "under" the modal):
Any ideas how to fix this bug?
Additional info
I am on Chrome and I have used a code very similar to the default example (http://twitter.github.io/bootstrap/javascript.html#modals).
Fixed, putting
?wmode=opaque
at the end of the youtube url.
I'm writing a chrome extension.
When i click the browser action button in the first time - all goes well.
When i click the browser action button the second time, after several minutes of not clicking it, it takes more than 10 seconds until the popup is shown.
I've tried commenting out all of the periodic methods in the background and all of the methods in the load event of the popup, but it still doesn't shown immediately.
any suggestions?
I had a similar issue with the popup when I was adding an iframe to the popup. Chrome would wait with showing the popup until that iframe was loaded.
For me the fix was wrapping the code that added the iframe to the HTML in:
setTimeout(function(){
// Code here
},0);
This way Chrome showed the popup first, after which it begin with loading the iframe.
Maybe you have a similar problem?
i have seen this behavior before when you have a long running ajax call that you are doing on popup load.. hard to tell further without code samples or description of what you are doing
Thought about it some times, and I decided to ask:
Why do a browser don't block the screen when doing a postback?
I have always been bothered by the fact that web browsers usually (can't say I've used them all) doesn't block the screen after I click a button that produces a postback. As I see it, during post a browser is expecting the server to send some information back. If it doesn't, the connection will time out and the page will be replaced by an error. If the server answer, it has to be with a web page; In other words, there's no possibility to keep the current web page rendered.
But it happens rather often that I click a button, realize that I forget to check a checkbox and so I click it, but to no avail. I know, I should have realized that clicking the checkbox wouldn't help, but hey, I usually doing stuff in auto-mode.
I think that it could be that the browser blocked the web page after you pushed a button or clicked a link that will produce a post back, so you couldn't press anything. But for some reason most browsers don't. Why?
The browser only shows what the page says and does what the script tells it to. If the page designer didn't implement anything to disable input during the connection, the brower leaves it up. In some cases this can be useful, such as when the input devices need to be available (although I can't think of a good example off the top of my head). A quick way to disable them (aside from disabling each individual input) is to have a hidden div with a z-index higher than the rest of the page become unhidden with a low opacity (screen looks slightly tinted, div prevents anything underneath it from being used) and then hiding it again when a response is received.
Ultimately it's just the result of a design choice. Does that answer your question?
When a browser blocks input is generally intentionally programmed that way.
Postback and clicking a button is not coupled because a button is not always used to do a postback.
Even when the browser is doing a request to some server in background, this request is not always fired by a button pressed (see Ajax)
In other words, there are much more complex scenarios than "push button, then postback", in order to cover every scenario, browser let this control to the programmer.
I have a page where I open a "modal window". It is really just a DIV, with an IFRAME inside, where I load another page. When I want to refresh the page, the browser pops up a window saying "Are you sure you want to navigate away from this page? Reloading this page will cause the modal window to disappear. Press OK to continue, or Cancel to stay on the current page."
How does this message get generated? How does the browser figure out that I have a modal window there, because I don't use any window.open() call from JavaScript? Is there any way to disable this behavior of the browser.
It may be body.onunload in the source of the page loaded in the IFRAME.
As the modal window is essentially an IFRAME, then when you close (or refresh) the main window, the browser knows it is killing that IFRAME, hence any body.onunload in that IFRAME fires.
If you have a function that handel onbeforeunload, automaticaly the Firefox message is generated.
you can disable it by returning null at the and of your handler.
This could be caused by some script modifying all off-site links to display this modal window, and then return true, or return false based upon your interaction with the modal window.
If you want to strip that behavior, you could remove all click events for external links.