Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Cursor overlays Textfield when you tab into it, but does not render border color properly

Avatar

Former Community Member
When ever I tab into a text field or click inside to have the cursor blinking inside the textfield, it seems like the cursor object overlays the textfield and this is causing a problem. I'm using Adobe LiveCycle Designer 7.1 and I want to change the color of the text field border upon entering the text field, so I put this script in the Enter event of the textfield.



this.borderColor = "0,0,255";



I can see the bottom side of the border turn blue but the remaining sides are still the original color. My guess is that the cursor is overlaying the text field and does not refresh it self to reflect the new color of the border which is underneath the cursor.



When I put the same script in the MouseEnter event I get the desired behavior because the cursor is not overlaying the border. I managed to make the text field hidden, change the border color, then make the text field visible again.



this.presence = "hidden";

this.borderColor = "0,0,255";

this.presence = "visible";



This works but, it is not acceptable because of the time it takes to re-render the PDF.



Can anyone tell me how I might be able to get the cursor to render the new underlying border properly? I'm open to any suggestions



Thanks,

Alex
1 Reply

Avatar

Former Community Member
Well, I've determined the cause of the problem has to do with the lack of support provided by the Adobe XML Form Object Model. Every TextField encapsulates a caption object. This object has two properties, placement and reserve, that can be used to manipulate the placement of the "Caption", hence the cursor when it enters the TextField.



The problem is that we only have one placement property per caption object. This limits the ability to specify both the height and width of the caption region. According to the XML Form Object Model 2.2, "the effect of the reserve property is determined by the placement property. When the caption is placed at the left or right, the reserve property specifies the height of the caption region. When the caption is placed at the top or bottom the reserve property specifies the width." A more ideal Object Model would specify two placement properties with corresponding reserve properties so that both the width and height can be manipulated at the same time, allowing us to squeeze the caption region within the boundary of the TextField border.



I initially though the cursor was overlaying the TextField border but now Im convinced it is the caption object overlaying the TextField. By adjusting the reserve property of the caption object I began to see more of the underlying border changing color when the enter event fired, the problem is that I can only adjust the width or height but not both.



I'm still trying to find a workaround so if you happen to know one please let me know.



Alex