Created
April 25, 2011 04:11
-
-
Save lojjic/940146 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(prop == 'marginRight' && out != '0px' && !supports.RightMargin){ | |
/* | |
selection = window.getSelection(); | |
ranges = []; | |
for (i = 0, len = selection.rangeCount; i < len; i++) { | |
ranges.push(selection.getRangeAt(i).cloneRange()); | |
} | |
*/ | |
/* | |
var selection = window.getSelection(), | |
range = selection.rangeCount && selection.getRangeAt(0); | |
if (range) { | |
range = range.clone(); | |
} | |
*/ | |
display = this.getStyle('display'); | |
el.style.display = 'inline-block'; | |
out = view.getComputedStyle(el, '').marginRight; | |
el.style.display = display; | |
/* | |
if (range) { | |
selection.removeAllRanges(); | |
selection.addRange(range); | |
} | |
*/ | |
/* | |
selection.removeAllRanges(); | |
for(i = 0; i < len; i++) { | |
selection.addRange(ranges[i]); | |
} | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment