Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Trouble Focusing on Ipad
02/10/2014
10:45
Avatar
Nahro
Member
Members
Forum Posts: 13
Member Since:
02/10/2014
sp_UserOfflineSmall Offline

Hello,

I am currently working on web-based app for a customer, basically what it should do is just output a grid with informations from a databse, and give the user the possibillity to a few information.
This is all working quite ok, I just have one trouble getting the focus to the first editable cell in a selected row - BUT only on the Ipad/Iphone.

The focus works ok on a PC, on the Ipad the editmode starts correctly, and works fine, but isnt focusing anything - which means the customer needs to click on a row to start editing, then click into the textbox to actually open the virtual keyboard.

I have read up on the behaviour of the Ipad and it seems to be a common problem - solved by setting the focus by changing the touchend/mouseup event, but in context of jqGrid I just dont know how to do it.
Did anybody here had the problem before and might know how to fix it?

thanks in advance!

03/10/2014
13:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

 

Depending on the editing module you may use a events which fire after the editing is build.

 

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/11/2014
12:17
Avatar
Nahro
Member
Members
Forum Posts: 13
Member Since:
02/10/2014
sp_UserOfflineSmall Offline

Hi,

 

This is for example the way I tried to do it: (you can see I tried it via different ways)

onSelectRow: function(id){
            if(id!=lastsel){
                jQuery('#list').jqGrid('saveRow',lastsel);
                //Adding Value for Submission Counter
                makeAmountOutput();
                
                //Set Null, select new Row
                lastsel = null;
                jQuery('#list').jqGrid('editRow',id,true);
                lastsel=id;
                var focusElement = id+'_NR';
                //alert(focusElement);
                $(focusElement).focus();
                //$(document).bind("mouseup",function(event) {
                //    jQuery('#list').jqGrid('getCell',id,'NR').focus(); //selects specific row and underlying cell and sets the focus
                //});
            }

As I said in another Thread of mine (and most likely is shown by my lack of talent to format anything correctly ^^'')
I am rather new to Jscript / HTML, but I start to get the hang of it.

Anyway I really appreciate the help - even though I have vanished for the past month...

09/11/2014
13:27
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

 

In the last release we have a parameter named focusField which should be a number represented the number of colModel start from 0. If set the desired field should be focused

jQuery('#list').jqGrid('editRow',id, { keys: true, focusField : 3} );

 

Another possible solution is to try to use oneditfunc which I recommend you in my previous post

jQuery('#list').jqGrid('editRow',id, {   keys: true,   oneditfunc : function( rowid) {     $("#"+rowid+"_NR").focus();   } });

 

Kind Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

10/11/2014
09:20
Avatar
Nahro
Member
Members
Forum Posts: 13
Member Since:
02/10/2014
sp_UserOfflineSmall Offline

Worked like a charm on my PC so far :D thank you very much - I will edit once I could test it on my Ipad!

thanks agains!

17/11/2014
12:19
Avatar
Nahro
Member
Members
Forum Posts: 13
Member Since:
02/10/2014
sp_UserOfflineSmall Offline

So,

Apperantly since IOs 7.0 Apple made it "near" impossible to set focus programmatically - you can only set Focus on a select few user initiated events, such as touchend/clickend events.

Even if it is kind of a bummer - I guess it can't be helped, thank you anyway for your help and replies.

 

I have one other question regarding teh manipulation of attributes of the textboxes generated by the edit mode. But I am not sure if I should open a new Thread or just keep it in this one? (not so sure about the forum policies here...)

19/11/2014
15:38
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Yes We can not do anything in this case.

About the question - new question - new thread. 

 

Kind Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
67 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information