I have this odd problem with a third party script. On our site a popup window loads a demo of one of our applications when a link is clicked. The third party script is supposed to popup an additional window underneath at the same time or sometime thereafter.
(Yeah this sounds crazy but the popups must load in this way.)
Of course this works fine in FF3.
Problem is in IE6 only the third party script pops up, but not the demo popup. If I click the link again the demo popup works.
After the thirdparty script saves it's session cookie it's window doesnt popup anymore but then the Tools popup works. (if i reload the page and it saves the cookie info -- this is the expected behavior. the third party popup should only load on the first session)
Seems to me that at some point down the wire windows.open isnt getting called properly because of some timing issue or windows.open being redefined somewhere. I don't see any error messages.
To pinpoint the issue I thought I'd have to see whats going on with the windows on the click.
I guess I need some help in figuring out what information I should look for to try and debug this issue.
This'll tell you if you're dealing with the real window.open or a redefined one:
var isOpenNative = /\[native/.test(window.open+'');
Related
I've encountered a Safari-specific JS issue in a page I'm locally developing, so I need to use the Safari Web Inspector.
In Safari Version 13.1.1, when I open the inspector and select Develop > Show JavaScript Console and start entering JavaScript, I don't get any output and the JavaScript is not executed (e.g. an alert does not fire).
On any other page, the safari JS console works just fine for me. Here's an example of normal behavior, on stackoverflow.com:
Note: the Safari JS console on other locally developed pages are working just fine.
What could possibly be causing this?
As other users mentioned, opening the page in a new tab fixes this, but you can also just close the Javascript console (clicking the 'x' in the console window) and re-open it.
Less than ideal, but if you reopen the file on a new tab, the new console works.
I get this error. often, this is because I occasionally repeat something way too many times, so that it just stops executing the console, I believe to prioritize other code. my fix is to re-open the page, and even though re-loading sounds like it works, it doesn't always.
I’ve encountered a problem I can’t solve.
I’m working on a project with MFC in Visual Studio. The problem is, sometimes GUI just stop visibly reacting, but technically it keeps doing the functions it was intended to do. It means, when I press a button, the function OnBnXXXPressed is executing, but the button doesn’t look like it was pressed, as if I’ve pressed on a picture of button, not the button itself. And it’s not just this button — every other element of GUI seems to keep working, but doesn’t show that it is working.
Also, in this state dialog windows don’t show up upon their call. If I call AfxMessageBox, the message box won’t show up, and the thread that called this function, will not be blocked; AfxMessageBox will basically be skipped.
I have absolutely no idea what can possibly cause that behavior. The question is: what should be happening in program for it to behave this way? Especially if it’s built with MFC?
The project consists of 50+ files, and every function responsible for GUI makes changes to the elements it is about. I do not know where the error is, and I ask you, to the very least, where should I look for it.
Thank you for attention!
The answer was originally provided in the comment section. My code indeed has a GDI resource leak that was provoking this behavior.
When a button is clicked, are you doing a bunch of processing, or do you return fast? If you don't return, maybe locking the UI thread. After a user presses on the button, how long is it taking before the OnClick for that finishes running?
If that's it, here's some more info: https://learn.microsoft.com/en-us/windows/desktop/Win7AppQual/preventing-hangs-in-windows-applications
The solution I've generally used for long-running logic on a UI click is to run it a background thread.
I've searched everywhere for an answer and I can't seem to find a solution to the problem I'm facing, hopefully this will help others in the future as well.
I am unable to login to my magento admin panel. I'm able to input my username and password per usual, but my login button doesn't "click". My mouse recognizes the button as a button and changes to the "finger" cursor, but when I click nothing happens, no button animation to show click confirmation, no URL changes, no refresh as if there was an "invisible layer" in front of it preventing the click. The results are consistent through multiple devices and browsers. I've cleared Cache and session data.
Anybody have any clue what could be going on or know of a potential fix? Much Appreciated~
Open your browser's developer console and check if there's anything weird going on with the submit form. It is a pretty straight forward standard form submit together with the varienForm js functionality. Also have you tried pressing enter after typing your login data instead of clicking the button? That should also submit the login form. Make sure to disable all browser extensions that could interfere such as noscript or adblockers.
So I am working on an issue where on load an item is gaining focus and I don't want this to happen, I am attempting to figure out why this is happening.
so I go into chrome and set the Event Listener Breakpoints for focus and DOMfocusIn/focusOut, but it doesn't seem to matter, the page will load, and I will see the anchor tag (used for a button) gain focus right after, but it doesn't trigger the breakpoint.
What is more weird is that when I break on load of the page and resume it, it no longer gains focus (although everything else seems to work fine)
Why does hitting a break point prevent focus?
and Why does it not hit a break point when I set the event listener to focus?
is there a way to give focus unintentionally? (ie. without an obvious focus function call)
I think this is a bug, I found a way to figure this out. essentially I added an onFocus function to anchor tag in question and made an alert with the following code:
alert(arguments.callee.caller.toString());
This shows who was calling the onFocus, and it actually worked, so I think this means it is a chrome specific bug.
I had to add the onFocus with javascript due to the code being in a taglib and no onFocus attribute available, but it worked.
I am using autoit to handle javas script popup code as
autoit.WinWaitActive("[Class:#32770]")
result =autoit.ControlClick("[Class:#32770]","","Button1")
But when I click on the button to open the popup it waits for a longer time & if the user is performing operations on another window, it will no go further. Only when the user clicks on the current window does it work. Means user should be focused on IE browser at the time of javascript popup.
Most tools that work up at the OS UI level (as autoit does) require that the window to be worked on has focus in order to have things like clicks or keyboard input end up in the correct window.
You'll probably want to set the focus first, then try to click, if you are using autoit
There are other methods for dealing with JS popups, especially with more current versions (1.9.0 or above) of watir, which are more elegant. Refer to the Javascript Popups page in the Watir Wiki
Do be aware that most of the solutions you see presume that the browser will have focus. If you need to run scripts at the same time as doing other work and don't want what you are doing to interfere, I might recommend using a virtual machine to run the scripts