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.)
set focus issue.
-
- 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
-
- 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.
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.
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 279 times
-
- 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.
I got this working. Here's what I had to do. Not sure why though.
Thanks for your help, Scott.
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);
-
- 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.
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.
Who is online
Users browsing this forum: No registered users and 7 guests