set focus issue.

Use this board to ask questions or have discussions with other Rich Displays users.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: set focus issue.

Post by Scott Klement »

It looks like scrolling the scrollbar is placing focus into the textbox. I imagine if you click in the textbox, that'd work, too.

I noticed that you have it doing this while you type. What event are you doing this on?

I don't exactly know what's happening or why... but, I'm sure I could figure it out if I could "play" with the code. You can do Ctrl-F9 and post the json.txt here, that would make it possible for me to "play" with it. (Make sure there's nothing confidential on the screen -- remember, this is a public discussion forum.)
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: set focus issue.

Post by mwalter »

It's on the onChange event in the Item Number field.

Weird thing is if I do Ctl-F9 when the highlighted field is gray, it doesn't work. However, I could do it once I clicked on the scroll bar, and the highlight turned blue.
Attachments
json (13).txt
(25.07 KiB) Downloaded 272 times
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: set focus issue.

Post by mwalter »

I got this working. Here's what I had to do. Not sure why though.

Thanks for your help, Scott.

Code: Select all

                    setTimeout (function() {
                        this.focus();                        
                        var count = getObj("txtCount." + x)
                        var myGrid = getObj("Grid1");
                        count.focus();
                        count.select();
                        myGrid.grid.scrollToRow(x);
                    },200);

JohnAkers
New User
Posts: 3
Joined: Wed Nov 10, 2021 10:25 am
First Name: John
Last Name: Akers
Company Name: design pro usa
Contact:

Re: set focus issue.

Post by JohnAkers »

You didn't include mobile apps, however it's worth noting that mobile platforms (iOS, Android, etc.) frequently hinder the ability to programmatically get focus. Setting focus causes the touch keyboard to pop-up on the mobile display, which covers a large portion of the display and can make the page 'ugly,' therefore it blocks it under specific conditions.... if this is a mobile app, you'll want to read up on when you can and can't set focus. iOS app development specially is quite complexed and don't support these programs easily.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests