Skip to content

dir="rtl" causes display table test to fail #716

Closed
barkan opened this Issue Sep 28, 2012 · 5 comments

2 participants

@barkan
barkan commented Sep 28, 2012

Reproduced in:

  • chrome 22 on Windows 7/Mountain Lion
  • Safari 6 Mountain Lion
  • Firefox 12 Mountain Lion
  • Opera 11.61 Mountain Lion
    (May happen in other browsers, this is what was handy)

  1. Take a page, add dir="rtl" to the html tag
  2. Modernizr adds .no-displaytable to html
@ryanseddon
Modernizr member

Can you create a test case please.

@barkan
barkan commented Oct 1, 2012

http://jsfiddle.net/zEwZ7/1/

I would suspect it's line 23 of css-display-table.js:
ret = child.offsetLeft < childb.offsetLeft;

@ryanseddon
Modernizr member

@barkan that's exactly what it is I've got a simple fix that just changes the direction back to ltr directly on the injected test element.

Can you test this and let me know if that's working for you?

@barkan
barkan commented Oct 1, 2012

The fiddle seems happy.

@ryanseddon ryanseddon closed this in b0a6e48 Oct 2, 2012
@barkan
barkan commented Oct 8, 2012

Since I'm unfamiliar with the github flow for Modernizr, just checking: how to tell when this is available via modernizr.com?

@SlexAxton SlexAxton added a commit to SlexAxton/Modernizr that referenced this issue Nov 5, 2012
@SlexAxton SlexAxton Merge branch 'master' of github.com:Modernizr/Modernizr
* 'master' of github.com:Modernizr/Modernizr: (81 commits)
  use setAttribute before using deprecated setAttributeNode
  explicitly set height in scrollbar test fixes false positive in IE9 (Issue #698)
  added page visibility API test
  Fix false negative of css table detect when document dir is rtl. Rewrote test. Fixes #716
  Update readme.md
  Remove BSD license and improve readme
  Added test for lossless WebP images
  Not by Addy Osmani
  binary websocket test likes to throw exceptions in Opera & Firefox and crash dolphin beta. nerfing for safety.
  navigator.cookieEnabled is a false pos in ie9. dont try it as a technique. thx @alrra. fixes #666
  bump 2.6.3pre on grunt
  bump to 2.6.3pre
  2.6.2
  When binding a function to a context, check that it actually has a bind method first.
  paul, you should always lint before you commit.
  sticky test. just formatting.
  whitespace. crlf's.
  fixing css-calc coding style, addTest gets no incoming arguments. ref #673
  Adds a test for position: (-webkit-)sticky support
  Make PhantomJS exit out of caniuse data matching early as it's unecessary
  ...
4093517
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@ryanseddon ryanseddon Fix false negative of css table detect when document dir is rtl. Rewr…
…ote test. Fixes #716
e4b31b4
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@SlexAxton SlexAxton Merge branch 'master' of github.com:Modernizr/Modernizr
* 'master' of github.com:Modernizr/Modernizr: (81 commits)
  use setAttribute before using deprecated setAttributeNode
  explicitly set height in scrollbar test fixes false positive in IE9 (Issue #698)
  added page visibility API test
  Fix false negative of css table detect when document dir is rtl. Rewrote test. Fixes #716
  Update readme.md
  Remove BSD license and improve readme
  Added test for lossless WebP images
  Not by Addy Osmani
  binary websocket test likes to throw exceptions in Opera & Firefox and crash dolphin beta. nerfing for safety.
  navigator.cookieEnabled is a false pos in ie9. dont try it as a technique. thx @alrra. fixes #666
  bump 2.6.3pre on grunt
  bump to 2.6.3pre
  2.6.2
  When binding a function to a context, check that it actually has a bind method first.
  paul, you should always lint before you commit.
  sticky test. just formatting.
  whitespace. crlf's.
  fixing css-calc coding style, addTest gets no incoming arguments. ref #673
  Adds a test for position: (-webkit-)sticky support
  Make PhantomJS exit out of caniuse data matching early as it's unecessary
  ...
9055bea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.