X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/38ca813a0e312e2768e5b9519f0415cd0aa84781..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=349-20120314 diff --git a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js index cdf8c4c0..3cbf32c4 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js +++ b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js @@ -1,6 +1,6 @@ tinyMCEPopup.requireLangPack(); -var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false; +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; var colors = [ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", @@ -266,10 +266,10 @@ function dechex(n) { } function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); partWidth = document.getElementById('colors').width / 6; partDetail = detail / 2;