2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-09-07 08:12:36 -06:00

positioning bug found by @ct.js

positioning bug on relative|absolute
This commit is contained in:
peterd 2015-01-30 12:45:26 +01:00
parent 1ac6303474
commit 77762df0b9
4 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,7 @@
<body>
<h1>Simple jQuery implementation</h1>
Calling the colorPicker on all inputs with the calssName 'color': <pre>$('input.color').colorPicker();</pre>
<p>
<p class="the-paragraph">
<input class="color" value="#B6BD79" />
<input class="color" value="rgb(162, 63, 3)" />
<input class="color" value="hsl(32, 95%, 23%)" />

File diff suppressed because one or more lines are too long

View File

@ -17,4 +17,7 @@ pre {
border: 1px solid #aaa;
border-radius: 3px;
width: 140px;
}
.the-paragraph {
position: relative;
}

View File

@ -98,7 +98,7 @@
$(elm)[onOff]('focus.colorPicker', function(e) {
var $input = $(this),
position = $input.position(),
position = $input.offset(),
index = multiple ? $(that).index(this) : 0,
colorPicker = colorPickers[index] ||
(colorPickers[index] = createInstance(this, config)),