I'm new to Livecycle and have taught myself the basics using the SmartDoc Technologies book on the subject. In the book it demonstrates how you can change the color of a button when you move the mouse over it. I've tried this out and have a found a problem that I can't fix - this happens using the example form from the book and my own form.
If the focus is currently on a field near the top of the form; if you scroll down the form and move the mouse over a button (which has the mouseEnter code on it to change the color), the form jumps back up to the top of the form where the current focus is as soon as the mouse enters the button control.
Is there any way of stopping this from happening, otherwise we cannot us the mouseEnter event to change the button color?
Maybe you use a variable in a script that overwrites the value of an objects property.
This sometime happens with variable names like x or y.
What script are you using?
Sure - here's a link to an example file:
So if I click into "First name" so it has focus, then scroll down and move my mouse over the "Add Expense" button, the form jumps back up to the top where the "First name" field is.
I was able to reproduce the issue. it looks like a bug in the Acrobat/Reader XFA rendering engine. It might not have the same effect, but you can do the same thing without issue for mouseDown and mouseUp events without the focus issue.
Thanks for investigating and confirming it's not just me!
I've moved the code from mouseEnter to mouseDown and the code from mouseExit to mouseUp. If I press the mouse button over the button and, whilst holding the button, move the cursor away from the button so I can see it properly, I can see the color has changed correctly. Moving the cursor back over the button and releasing the button and the color changes back correctly as well. No screen jumping.So it does seem to just be affecting the mouseEnter and mouseExit events.