Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
DataTable Editor using the TAB key to move to the next cell   Message List  
Reply Message #52079 of 52481 |
Re: [ydn-javascript] Re: DataTable Editor using the TAB key to move to the next cell

I could try your code because it had some PHP includes that I don't
have. Anyway, I would say, don't bother. I tried textbox cell editors in
IE, Safari, Firefox, Opera and Chrome and both in Safari and Chrome,
which both use the same WebKit engine, the select method does not select
the content of the input box.

https://bugs.webkit.org/show_bug.cgi?id=8114

https://bugs.webkit.org/show_bug.cgi?id=22691

http://code.google.com/p/chromium/issues/detail?id=4505


It works fine in all the other browsers, not a bad record. The YUI
library contains plenty of code to compensate for such quirks, you might
want to file a bug report for this, but I wouldn't expect YUI to
compensate for the browser deficiency, it not being a fatal one. In
fact, the bug reports above are quite old and nobody seems to care much
about them.

Satyam



George Papaioannou escribió:
>
>
> Hi Satyam,
>
> In Chrome the following code does not set the focus to the inline cell
> texteditor
>
> MoneyTable.subscribe("editorShowEvent", function(oArgs){
> var oEditor = oArgs.editor;
>
> oEditor.focus();
>
>
> //this.getDataTable()._focusEl( this.textbox) ;
> //this.textbox.select();
>
> });
>
> Is that correct or am I doing something wrong ?
>
> Regards,
>
>
> --- ???? *????., 03/11/09, ?/? Satyam /<satyam@...>/* ??????:
>
>
> ???: Satyam <satyam@...>
> ????: Re: [ydn-javascript] Re: DataTable Editor using the TAB key
> to move to the next cell
> ????: ydn-javascript@yahoogroups.com
> ??????????: ?????, 3 ????????? 2009, 20:01
>
>
>
> George Papaioannou escribió:
> >
> >
> > Satyam the custom drop down menus still does not have the focus.
> Any
> > recommendation ?
> >
> Not really, do you have a working sample I can take a look at?
> >
> >
> > Is there anyway to make (select) by default the string inside the
> > inline cell editor when it opens ? In Firefox this is by default
> but
> > in Chrome is the text is unselected.
> >
> The code for method focus of TextboxCellEditor does it, or so it
> would seem:
>
> /**
> * Sets focus in TextboxCellEditor.
> *
> * @method focus
> */
> focus : function() {
> // Bug 2303181, Bug 2263600
> this.getDataTable( )._focusEl( this.textbox) ;
> this.textbox. select();
> },
>
> If it doesn't work consistently across browsers, I'm sure the YUI
> team
> would like to know. Chrome is not supported but is based on the same
> WebKit that Safari is, which is supported, so they usually behave
> alike.
>
> Satyam
> >
> > Regards,
> > George
> >
> > --- ???? *???., 28/10/09, ?/? Satyam /<satyam@satyam. com.ar
> </mc/compose?to=satyam%40satyam.com.ar>>/* ??????:
> >
> >
> > ???: Satyam <satyam@satyam. com.ar
> </mc/compose?to=satyam%40satyam.com.ar>>
> > ????: Re: [ydn-javascript] Re: DataTable Editor using the TAB key
> > to move to the next cell
> > ????: ydn-javascript@ yahoogroups. com
> </mc/compose?to=ydn-javascript%40yahoogroups.com>
> > ??????????: ???????, 28 ????????? 2009, 20:15
> >
> > I forgot to call stopEvent when the key is one I want to deal
> > with. This
> > was causing some issues, like the cell editor for the radio
> > buttons now
> > showing up. I fixed the example. Perhaps it caused problems with
> your
> > dropdown as well since the keydown event kept bubbling.
> >
> > Satyam
> >
> > George Papaioannou escribió:
> > >
> > >
> > > Thank you Satyam, it worked without problems to me.
> > >
> > > The only situation I have is with my custom drop down menus
> > insde the
> > > table (the one that the content are filled on the air with the
> > > doBeforeShowCellEdi tor event). It loses the focus ie does not is
> > > selected by default the drop down object itself, so the TAB
> > moves on,
> > > to the next object of the layout and not to the next cell as it
> > would be.
> > >
> > > I tryied to use the oEditor.focus( ) inside
> doBeforeShowCellEdi tor
> > > without success like below
> > >
> > > oEditor.dropdownOpt ions = r.DataSet.items; //setting the items
> > > oEditor.setOptions( );
> > > oEditor.focus( ); //keep focus to the drop down object itself
> > >
> > >
> > > Do you have any idea ?
> > >
> > > Regards,
> > > George
> > >
> > > --- ???? *???., 24/10/09, ?/? Satyam /<satyam@satyam. com.ar
> > </mc/compose? to=satyam% 40satyam. com.ar>>/ * ??????:
> > >
> > >
> > > ???: Satyam <satyam@satyam. com.ar
> > </mc/compose? to=satyam% 40satyam. com.ar>>
> > > ????: Re: [ydn-javascript] Re: DataTable Editor using the TAB key
> > > to move to the next cell
> > > ????: ydn-javascript@ yahoogroups. com
> > </mc/compose? to=ydn-javascrip t%40yahoogroups. com>
> > > ??????????: ???????, 24 ????????? 2009, 18:52
> > >
> > > I guess I'll have to figure out something, there is too many
> people
> > > asking for this. See:
> > >
> > > http://www.satyam. com.ar/yui/ 2.7.0/keynav. html
> > > <http://www.satyam. com.ar/yui/ 2.7.0/keynav. html
> > <http://www.satyam. com.ar/yui/ 2.7.0/keynav. html
> <http://www.satyam.com.ar/yui/2.7.0/keynav.html>>>
> > >
> > > It is just a first attempt, I don't know why it does funny things,
> > > like
> > > the tab order seems to be a little funny and some editors won't
> > > pop up.
> > > As if the getNextTdEl and get previous are not correct. I'll
> have to
> > > find out about that.
> > >
> > > Satyam
> > >
> > > George Papaioannou escribió:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Satyam, do you have any good idea of how to do this ?
> > > >
> > > > Regards,
> > > >
> > > > --- ???? *????., 19/10/09, ?/? Matt /<matt@lamplightdb. co.uk
> > > </mc/compose? to=matt%40lampli ghtdb.co. uk>>/* ??????:
> > > >
> > > >
> > > > ???: Matt <matt@lamplightdb. co.uk
> > > </mc/compose? to=matt%40lampli ghtdb.co. uk>>
> > > > ????: [ydn-javascript] Re: DataTable Editor using the TAB key to
> > > > move to the next cell
> > > > ????: ydn-javascript@ yahoogroups. com
> > > </mc/compose? to=ydn-javascrip t%40yahoogroups. com>
> > > > ??????????: ???????, 19 ????????? 2009, 14:06
> > > >
> > > > Thoughts, but haven't tried any of this, and I don't think
> there's
> > > > anything built in:
> > > >
> > > > - add an event listener for the tab key to your editor
> > > > - work out which cell you're in
> > > > - show the editor for the next cell
> > > >
> > > > Obviously there'll be a bit of extra work to go down to the next
> > > > line, or stop at the last cell of the last row.
> > > >
> > > > Editors have a 'keydownEvent' which you can subscribe to to
> listen
> > > > for a tab, something like:
> > > >
> > > > editor.on( "keydown" , function(e){ if(e.keyCode == 13 ){
> > > > gotoNextCell( ); }} )
> > > >
> > > > However I'm not sure what the best way to add a listener to all
> > > > editors is... maybe someone else has a good idea?
> > > >
> > > > If you call datatable.getCellEd itor() before it's hidden,
> you'll
> > > > get the current one (or you can pass the editor in your listener
> > > > to the function that does the cell moving), which then has a
> bunch
> > > > of methods giving you access to the current record, td, and
> > > > datatable itself etc - look at http://developer. yahoo.com/
> > > > yui/docs/ YAHOO.widget. BaseCellEditor. html
> > > > <http://developer. yahoo.com/ yui/docs/ YAHOO.widget.
> > > BaseCellEditor. html
> > > <http://developer. yahoo.com/ yui/docs/ YAHOO.widget.
> > BaseCellEditor. html
> > <http://developer. yahoo.com/ yui/docs/ YAHOO.widget.
> BaseCellEditor. html
> <http://developer.yahoo.com/yui/docs/YAHOO.widget.BaseCellEditor.html>>>>
> > > > which should be enough to work out where to go next.
> > > >
> > > > Sorry if this is telling you what you already know.
> > > >
> > > > Matt
> > > >
> > > > --- In ydn-javascript@ yahoogroups. com
> > > > </mc/compose? to=ydn-javascrip t%40yahoogroups. com>, "George"
> > > > <sdancer75@. ..> wrote:
> > > > >
> > > > > Any recommendation or thought ?
> > > > >
> > > > > Regards,
> > > > >
> > > > > --- In ydn-javascript@ yahoogroups. com
> > > > </mc/compose? to=ydn-javascrip t%40yahoogroups. com>, "George"
> > > > <sdancer75@> wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Is that possible to use keyboard shortcuts for moving among
> > > > cells when using inline cell editing mode?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > >
> > > >
> > > >
> > > > ____________ _________ _________ _________ _________ __
> > > > ???????????? ?? Yahoo!;
> > > > ?????????? ?? ?????????? ???????? (spam); ?? Yahoo! Mail
> > > ???????? ???
> > > > ???????? ?????? ????????? ???? ??? ??????????? ?????????
> > > > http://mail. yahoo.gr <http://mail. yahoo.gr
> > <http://mail. yahoo.gr <http://mail.yahoo.gr>>>
> > > >
> > > >
> > > > ------------ --------- --------- --------- --------- --------- -
> > > >
> > > >
> > > > No virus found in this incoming message.
> > > > Checked by AVG - www.avg.com
> > > > Version: 8.5.423 / Virus Database: 270.14.28/2454 - Release
> > > Date: 10/23/09 14:09:00
> > > >
> > > >
> > >
> > >
> > > ------------ --------- --------- --------- --------- --------- -
> > > ???????????? ?? Yahoo!
> > > ?????????? ?? ?????????? ???? ???? (spam); ?? Yahoo! Mail
> > ???????? ???
> > > ???????? ?????? ????????? ???? ??? ??????????? ?????????
> > > http://login. yahoo.com/ config/mail? .intl=gr
> > <http://login. yahoo.com/ config/mail? .intl=gr
> <http://login.yahoo.com/config/mail?.intl=gr>>
> > >
> > >
> > > ------------ --------- --------- --------- --------- --------- -
> > >
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG - www.avg.com
> > > Version: 8.5.423 / Virus Database: 270.14.33/2461 - Release
> > Date: 10/26/09 20:22:00
> > >
> > >
> >
> >
> > ------------ --------- --------- --------- --------- --------- -
> > ???????????? ?? Yahoo!
> > ?????????? ?? ?????????? ???? ???? (spam); ?? Yahoo! Mail
> ???????? ???
> > ???????? ?????? ????????? ???? ??? ??????????? ?????????
> > http://login. yahoo.com/ config/mail? .intl=gr
> <http://login.yahoo.com/config/mail?.intl=gr>
> >
> >
> > ------------ --------- --------- --------- --------- --------- -
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 9.0.698 / Virus Database: 270.14.46/2477 - Release
> Date: 11/02/09 20:39:00
> >
> >
>
>
> ------------------------------------------------------------------------
> ?????????????? Yahoo!
> ?????????? ?? ?????????? ???? ???? (spam); ?? Yahoo! Mail ???????? ???
> ???????? ?????? ????????? ???? ??? ??????????? ?????????
> http://login.yahoo.com/config/mail?.intl=gr
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.698 / Virus Database: 270.14.48/2479 - Release Date: 11/03/09
20:38:00
>
>



Wed Nov 4, 2009 7:19 pm

satyamutsa
Offline Offline
Send Email Send Email

Message #52079 of 52481 |
Expand Messages Author Sort by Date

Hi, Is that possible to use keyboard shortcuts for moving among cells when using inline cell editing mode? Regards,...
George
sdancer75
Offline Send Email
Oct 16, 2009
3:20 pm

Any recommendation or thought ? Regards,...
George
sdancer75
Offline Send Email
Oct 19, 2009
8:54 am

Thoughts, but haven't tried any of this, and I don't think there's anything built in: - add an event listener for the tab key to your editor - work out which...
Matt
mattatlamplight
Offline Send Email
Oct 19, 2009
11:07 am

Hi, Satyam, do you have any good idea of how to do this ? Regards, ... Áðü: Matt <matt@...> ÈÝìá: [ydn-javascript] Re: DataTable Editor...
George Papaioannou
sdancer75
Offline Send Email
Oct 24, 2009
7:39 am

I guess I'll have to figure out something, there is too many people asking for this. See: http://www.satyam.com.ar/yui/2.7.0/keynav.html It is just a first...
Satyam
satyamutsa
Offline Send Email
Oct 24, 2009
3:52 pm

Thank you Satyam, it worked without problems to me. The only situation I have is with my custom drop down menus insde the table (the one that the content are...
George Papaioannou
sdancer75
Offline Send Email
Oct 27, 2009
8:00 am

I forgot to call stopEvent when the key is one I want to deal with. This was causing some issues, like the cell editor for the radio buttons now showing up. I...
Satyam
satyamutsa
Offline Send Email
Oct 28, 2009
6:15 pm

Satyam the custom drop down menus still does not have the focus. Any recommendation ? Is there anyway to make (select) by default the string inside the inline...
George Papaioannou
sdancer75
Offline Send Email
Nov 3, 2009
3:23 pm

... Not really, do you have a working sample I can take a look at? ... The code for method focus of TextboxCellEditor does it, or so it would seem: /** * Sets...
Satyam
satyamutsa
Offline Send Email
Nov 3, 2009
6:03 pm

Satyam you can download a working example at http://rapidshare.com/files/302328748/Satyam.zip.html This sample implicate DataBase retriving data. You can...
George Papaioannou
sdancer75
Offline Send Email
Nov 4, 2009
2:20 pm

Hi Satyam, In Chrome the following code does not set the focus to the inline cell texteditor                   ...
George Papaioannou
sdancer75
Offline Send Email
Nov 4, 2009
4:15 pm

I could try your code because it had some PHP includes that I don't have. Anyway, I would say, don't bother. I tried textbox cell editors in IE, Safari,...
Satyam
satyamutsa
Offline Send Email
Nov 4, 2009
7:22 pm

I meant I could NOT try your code....
Satyam
satyamutsa
Offline Send Email
Nov 4, 2009
8:09 pm

Can you try adding the following code in your page: YAHOO.widget.TextboxCellEditor.prototype.focus = function () { this.getDataTable()._focusEl(this.textbox); ...
Satyam
satyamutsa
Offline Send Email
Nov 4, 2009
8:51 pm

Satyam, I will try your code today afternoon. The code I send to you, concerns the custom drop down menus and not the selected text in the text editor. The php...
George Papaioannou
sdancer75
Offline Send Email
Nov 5, 2009
7:18 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help