Giter VIP home page Giter VIP logo

Comments (8)

 avatar commented on July 17, 2024

Chrome 40 on the exact same revision and OS and I don't seem to be able to reproduce this.

Zoom level in browsers is just a nightmare to support. It is different in every browser and they are all buggy... Generally I don't support anything other than 100% zoom - although obviously it is a nice to have if it works correctly! Any other way to reproduce this, or perhaps you could try inspecting the element to see if it does have padding?

from scroller.

jmcphers avatar jmcphers commented on July 17, 2024

Yes, it has padding, and it's even explicitly assigned!

<div class="dataTables_scrollHeadInner" style="box-sizing: content-box; width: 869px; padding-left: 14px;">

image

Did you reload the page? This only repros for me if the page's first render is at > 100% zoom -- just zooming in on an already rendered DataTable is fine.

from scroller.

jmcphers avatar jmcphers commented on July 17, 2024

Also repros on Safari 8, but does not seem to repro on Firefox 33 (maybe WebKit related?).

from scroller.

 avatar commented on July 17, 2024

Bizarrely I can't reproduce on Safari either.

Exact steps I've taken:

  1. Load page
  2. Zoom using cmd-+
  3. Reload
  4. All the same.

Ooo. I think I might know what it is - the left-to-right detection in DataTables... I remember getting a report a little while back that when the zoom level was adjusted it made DataTables think it was right-to-left, so it puts space for the scrollbar on the left...

I'll bet that is what it is.

Could you do me a favour and on the page when that problem is showing open the console and punch in:

$.fn.dataTableSettings[0].oBrowser.bScrollbarLeft

My guess is that it will show true...

from scroller.

jmcphers avatar jmcphers commented on July 17, 2024

Yes, that's it!

> $.fn.dataTableSettings[0].oBrowser.bScrollbarLeft
true

from scroller.

 avatar commented on July 17, 2024

Got it - thanks!

It wasn't appearing on my machine as I've got (had) this machine configured to Apple's new scrollbars - zero width and floating. With scrollbars shown it was immediately visible.

The problem it turns out was indeed the left scrollbar detection - when DataTables checks for the position of an inner element that it set to be 1px, it expected to get back 1px, but when zoomed it was actually returning a non-integer value: 0.9943181276321411.

I've added a call to Math.round which should address the problem.

Thanks for your help investigating this.

This bug on the DataTables core repo also notes this issue.

from scroller.

 avatar commented on July 17, 2024

The fix and I'm just about to rebuild the nightly.

from scroller.

jmcphers avatar jmcphers commented on July 17, 2024

Awesome. Thanks!

from scroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.