Answer dialog intermittently loses focus
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Answer dialog intermittently loses focus
Hello,
I seem to be running into another issue with the Answer dialog. When used, sometimes it has focus immediately after it appears (like it should), and sometimes it does not. When it does not, the user is required to click somewhere on the dialog to place the focus back on it. I have repeatedly tested it and so far I cannot find any clues as to why it sometimes loses focus when it first appears.
Wondering if anyone knows what is going on with it? I notice there is a focus command, but I'm not sure if it will work with the answer dialog.
I seem to be running into another issue with the Answer dialog. When used, sometimes it has focus immediately after it appears (like it should), and sometimes it does not. When it does not, the user is required to click somewhere on the dialog to place the focus back on it. I have repeatedly tested it and so far I cannot find any clues as to why it sometimes loses focus when it first appears.
Wondering if anyone knows what is going on with it? I notice there is a focus command, but I'm not sure if it will work with the answer dialog.
-
- VIP Livecode Opensource Backer
- Posts: 9655
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Answer dialog intermittently loses focus
Hi.
Never seen this.
Are you talking about an "ask" or "answer" dialog. The "ask" dialog sort of has "focus", in that the cursor is blinking in the dialog. So in an "ask" dialog, it is possible to drop the cursor from the field by clicking somewhere else.
An answer dialog only has buttons, but you can still lose focus by clicking, say, back in the stack somewhere. Are you in the IDE or a standalone? What platform LC version and OS?
Craig
Never seen this.
Are you talking about an "ask" or "answer" dialog. The "ask" dialog sort of has "focus", in that the cursor is blinking in the dialog. So in an "ask" dialog, it is possible to drop the cursor from the field by clicking somewhere else.
An answer dialog only has buttons, but you can still lose focus by clicking, say, back in the stack somewhere. Are you in the IDE or a standalone? What platform LC version and OS?
Craig
Re: Answer dialog intermittently loses focus
Say what ?! Is that a Mac thing or something? Cause that don't happen here on 'nix, or in Windows, far as I can tell
Answer dialogs are completely blocking and should not loose focus (within their own program). The *only* way I can think of one loosing focus is if you click on something completely outside of the program it is running from, for instance, if you clicked on a desktop icon, another program not related to the answer dialog, etc.
-
- VIP Livecode Opensource Backer
- Posts: 9655
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Answer dialog intermittently loses focus
Are there other operating systems than Mac OS?
If I open a dialog of either kind, and instead of dealing with it right away, click on the card, say, I am still in LC, but the dialog loses focus. You are right about the blocking thing, that is, I can do nothing until I go back and deal with it.
So the lost focus is mainly visual, I guess, since it changes nothing about the current state of the process.
Craig
If I open a dialog of either kind, and instead of dealing with it right away, click on the card, say, I am still in LC, but the dialog loses focus. You are right about the blocking thing, that is, I can do nothing until I go back and deal with it.
So the lost focus is mainly visual, I guess, since it changes nothing about the current state of the process.
Craig
Re: Answer dialog intermittently loses focus
Well, if your able to even change the color of the dialog to ...erm, whatever it is when it doesn't have focus by clicking on another card from the same program, I'd say that was a bug, you can see in the video linked above that is *not* supposed to happen.
When you call an answer dialog, and you don't answer it, you have the choice of -
...moving the dialog around
...answering the dialog
and that is about it (or should be).
I wonder if that is what fredjoans means by 'loosing focus', i.e. that it is still blocking but not somehow looking like the foremost window.
When you call an answer dialog, and you don't answer it, you have the choice of -
...moving the dialog around
...answering the dialog
and that is about it (or should be).
I wonder if that is what fredjoans means by 'loosing focus', i.e. that it is still blocking but not somehow looking like the foremost window.
-
- VIP Livecode Opensource Backer
- Posts: 9655
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Answer dialog intermittently loses focus
Bogs.
If you:
you get a dialog with a blinking cursor. If you click somewhere inside that dialog (not in the field itself) or back on the card, your cursor remains blinking? And there is no change to the look of the dialog?
I remain unblinking.
Craig
If you:
Code: Select all
ask "xyzzy"
I remain unblinking.
Craig
Re: Answer dialog intermittently loses focus
All,
This is for the Answer dialog. LC 9.5.1 x64 (Windows 10 x64).
button script:
on mouseUp
answer information "Continue or cancel?" with "Cancel" or "Continue"
(etc, etc)
end mouseUp
Build standalone executable.
Click button. Answer dialog opens. Nothing is done by user besides just moving the mouse cursor. Hover mouse cursor over "Continue" but it does not highlight. Move mouse to "Cancel" and hover but it does not highlight. Left-click once anywhere on the answer dialog and seemingly nothing happens, but now when you hover over "Continue" or "Cancel" they will get highlighted as you hover over them. Now you can left-click and have it continue or cancel like normal.
Again, this happens intermittently. The way it seems to me is that somehow between the button getting clicked and the answer dialog appearing, something grabs the focus away from it. Also, I have noticed that when this happens I can click an object like a button behind the answer dialog with a left click - basically it is like I am clicking right through the answer dialog. It's kinda hard to describe but I hope this helps make it clearer.
This is for the Answer dialog. LC 9.5.1 x64 (Windows 10 x64).
button script:
on mouseUp
answer information "Continue or cancel?" with "Cancel" or "Continue"
(etc, etc)
end mouseUp
Build standalone executable.
Click button. Answer dialog opens. Nothing is done by user besides just moving the mouse cursor. Hover mouse cursor over "Continue" but it does not highlight. Move mouse to "Cancel" and hover but it does not highlight. Left-click once anywhere on the answer dialog and seemingly nothing happens, but now when you hover over "Continue" or "Cancel" they will get highlighted as you hover over them. Now you can left-click and have it continue or cancel like normal.
Again, this happens intermittently. The way it seems to me is that somehow between the button getting clicked and the answer dialog appearing, something grabs the focus away from it. Also, I have noticed that when this happens I can click an object like a button behind the answer dialog with a left click - basically it is like I am clicking right through the answer dialog. It's kinda hard to describe but I hope this helps make it clearer.
-
- VIP Livecode Opensource Backer
- Posts: 7230
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Answer dialog intermittently loses focus
That's definitely not correct behavior. Since you can click through the dialog sometimes, it sounds like a particular condition is causing the problem. It's still a bug though. Can you repeat it in a plain new test stack with only a few buttons?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Answer dialog intermittently loses focus
All,
Ok I think I may have discovered some more information that may help. I have been opening the answer dialog over and over, moving the mouse, trying to pay attention to any subtle differences when the problem occurs. This evening I noticed something: if I don't move the mouse cursor at all after clicking the button that opens the answer dialog, then the problem doesn't occur. It only occurs when I immediately move the mouse cursor after clicking the button that opens the answer dialog. It doesn't always cause the problem when I move the mouse cursor after clicking the button that opens the answer dialog, but if I don't move the mouse cursor at all until the answer dialog has fully appeared then the problem doesn't surface. I tried moving the cursor different directions and different speeds, but so far I have not been able to determine any common direction or speed. It still seems intermittent, but it is only occurring if I click the button to open the answer dialog and immediately start moving the mouse cursor.
jacque: I have not tested it in a plain stack (yet).
Ok I think I may have discovered some more information that may help. I have been opening the answer dialog over and over, moving the mouse, trying to pay attention to any subtle differences when the problem occurs. This evening I noticed something: if I don't move the mouse cursor at all after clicking the button that opens the answer dialog, then the problem doesn't occur. It only occurs when I immediately move the mouse cursor after clicking the button that opens the answer dialog. It doesn't always cause the problem when I move the mouse cursor after clicking the button that opens the answer dialog, but if I don't move the mouse cursor at all until the answer dialog has fully appeared then the problem doesn't surface. I tried moving the cursor different directions and different speeds, but so far I have not been able to determine any common direction or speed. It still seems intermittent, but it is only occurring if I click the button to open the answer dialog and immediately start moving the mouse cursor.
jacque: I have not tested it in a plain stack (yet).
Re: Answer dialog intermittently loses focus
Sorry this reply took so long Craig, but I didn't want you to think that I forgot about you
The only difference in behavior between the ask and answer dialogs is that ask obviously has a field. Of course, the OP was asking about the answer dialog, but in any case -
Two questions that are not equal here, so 2 answers -
1a. if you click somewhere in the dialog that is not in the field of the dialog, the cursor stops blinking in the field, however, this does *not* cause the dialog to loose focus, you have clicked somewhere else on that dialog, and moved the focus to another part of that dialog (card, button, etc).
However, If you move the dialog, guess what? Cursor goes straight back into the field, even though you haven't clicked inside of the field after movement occurred. This is how it *should* work, no matter the OS.
1b. If you click anywhere else outside of the dialog itself, the cursor should remain blinking because you are not clicking on the dialog itself, and since it is blocking, as I said above, your options are to deal with it, or not.
2. Of course there should be no change to the look of the dialog, it should be front and foremost until dealt with. If you are seeing something different, then you have a bug my friend
I have quickly set up this video before my classes begin, I have not had time to edit or even plan it out well, but I didn't want this to take any longer getting back to you.
Blocking Ask Dialog Video.