New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
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

This comment has been minimized.

Member

ryanseddon commented Oct 1, 2012

Can you create a test case please.

@barkan

This comment has been minimized.

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

This comment has been minimized.

Member

ryanseddon commented Oct 1, 2012

@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

This comment has been minimized.

barkan commented Oct 1, 2012

The fiddle seems happy.

@ryanseddon ryanseddon closed this in b0a6e48 Oct 2, 2012

@barkan

This comment has been minimized.

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 added a commit to SlexAxton/Modernizr that referenced this issue Nov 5, 2012

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 Modernizr#698)
  added page visibility API test
  Fix false negative of css table detect when document dir is rtl. Rewrote test. Fixes Modernizr#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 Modernizr#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 Modernizr#673
  Adds a test for position: (-webkit-)sticky support
  Make PhantomJS exit out of caniuse data matching early as it's unecessary
  ...

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015

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 Modernizr#698)
  added page visibility API test
  Fix false negative of css table detect when document dir is rtl. Rewrote test. Fixes Modernizr#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 Modernizr#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 Modernizr#673
  Adds a test for position: (-webkit-)sticky support
  Make PhantomJS exit out of caniuse data matching early as it's unecessary
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment