Skip to content

Instantly share code, notes, and snippets.

@lojjic
Created April 25, 2011 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lojjic/940146 to your computer and use it in GitHub Desktop.
Save lojjic/940146 to your computer and use it in GitHub Desktop.
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