Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8892673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:03:57+00:00 2026-06-14T23:03:57+00:00

This is the jsFiddle – http://jsfiddle.net/75Rqe/8/ Unfortunately, I could not reduce it to a

  • 0

This is the jsFiddle – http://jsfiddle.net/75Rqe/8/

Unfortunately, I could not reduce it to a minimal example, so it contains quite a lot of code.

It is a stripped down version of a mixin I wrote for the YUI3 Datatable to implement inplace edit.

First the problem:

  1. Load the jsFiddle
  2. Scroll the table down until the row with dnum 26 is the last visible row in the table:
    enter image description here (there is nothing special about 26, just for the sake of the example)
  3. Now click the dnum field of this row and change 26 to something else:
    enter image description here
  4. Finally press the tab key:
    enter image description here

If you are using Chrome, then the table is auto scrolled on tab to show the modified row right in the middle of the table.

No such thing happens on Firefox or IE9:
enter image description here

I understand that it is unfair to expect from anyone to analyze the code of jsFiddle, so my question is how can I troubleshoot this thing? I was trying to place breakpoints in various “obvious” places using the Chrome development tools – no dice. The content scrolls and no breakpoint is ever hit.

Can I break when the scroll event occurs?

In short, I am pretty desperate (debugging Chrome with windbg already crossed my sick mind).

Any feedback is welcome.

EDIT

OK, SO insists on some code, so here it is:

YUI.add('dt-inplace-edit',
  function (Y) {
    "use strict";
    ...

    function DataTableInplaceEdit() {
    }

    DataTableInplaceEdit.prototype = {
    ...
    };

    Y.DataTable.InplaceEdit = DataTableInplaceEdit;
  }, '0.1', {requires: ['node']});


YUI({filter: 'raw', debug: true, combine: false}).use("datatable", "node", 'datatable-scroll',
  'dt-inplace-edit',
    function(Y) {
    var i, table, data =[
       {dnum:100, dint:1, dtxt:"Test 1 string", dname:"George"},
       {dnum:101, dint:2, dtxt:"Test 2 string", dname:"Paul"},
       {dnum:102, dint:3, dtxt:"Test 3 string", dname:"Chase"},
       {dnum:103, dint:4, dtxt:"Test 4 string", dname:"Marge"},
       {dnum:104, dint:5, dtxt:"Test 5 string", dname:"Ben"},
       {dnum:105, dint:6, dtxt:"Test 6 string", dname:"Skyler"},
       {dnum:106, dint:7, dtxt:"Test 7 string", dname:"Lara"},
       {dnum:107, dint:1, dtxt:"Test 1 string", dname:"George"},
       {dnum:108, dint:2, dtxt:"Test 2 string", dname:"Paul"},
       {dnum:109, dint:3, dtxt:"Test 3 string", dname:"Chase"},
       {dnum:110, dint:4, dtxt:"Test 4 string", dname:"Marge"},
       {dnum:111, dint:5, dtxt:"Test 5 string", dname:"Ben"},
       {dnum:112, dint:6, dtxt:"Test 6 string", dname:"Skyler"},
       {dnum:113, dint:7, dtxt:"Test 7 string", dname:"Lara"}
    ];

    Y.Base.mix(Y.DataTable, [Y.DataTable.InplaceEdit]);

    data = data.concat(data.concat(data));
    for (i = 0; i < data.length; i += 1) {
        data[i] = Y.merge(data[i]);
        data[i].dnum = i;
    }

    Y.one('body').addClass("yui3-skin-sam");               
    table = new Y.DataTable({
        columns:[ 'dnum', 'dint', 'dtxt', 'dname' ],
        data: data,
        height: '15em',
        width: '100%',
        scrollable: 'y',
    }).render('#dt');
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:03:58+00:00Added an answer on June 14, 2026 at 11:03 pm

    When you tab to an element, it seems that chrome scrolls the element into the middle of the container, where as in FF and IE, it seems to do the default behavior of scrollIntoView(), which is to align it to the bottom

    See this example (in Chrome and FF/IE). It should help you understand the problem. Try tabbing after you clicked the first anchor in the scroll container, and also try clicking the buttons that call scrollIntoView directly

    I particularly prefer Chrome’s behavior, but I don’t think there’s much you can do about it, besides calling scrollIntoView yourself after uses hits tab (and cancelling the tab’s default behavior with e.preventDefault)

    Here’s an implementation where tabbing through the links doesn’t move items into the middle when tabbing them

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please look at this jsfiddle: http://jsfiddle.net/xMAKq/20/ How could I center the left column text
Take this jsFiddle as example: http://jsfiddle.net/mostthingsweb/cfDHm/3/ . Note that I am able to use
See this jsfiddle for example: http://jsfiddle.net/FrJRA/1/ and note that the inner span's border overlaps
please run this jsfiddle as an example. http://jsfiddle.net/AFzqt/11/ in my example, i have a
I'll let this jsfiddle describe most of the problem for me. http://jsfiddle.net/zAPVQ/4/ I've got
Have a look at this jsfiddle: http://jsfiddle.net/Dh96F/1/ The Expand button will animate the widening
I this: http://jsfiddle.net/ZP76c/ I'm trying to control the scope at which jQuery selects elements
I have elements structured roughly like this: http://jsfiddle.net/zyySd/ Is there any way to achieve
I have a setup like this: http://jsfiddle.net/zzjSC/3/ and I am wondering why the surrounding
Consider this jsfiddle: http://fiddle.jshell.net/maple/JbEJN/show/ (this is the result window, in order for replaceState to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.