Skip to content

Commit b64e470

Browse files
committed
Fix test
1 parent ace3e56 commit b64e470

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/cursor_position_test.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@
1010
<script type="text/javascript">
1111

1212
window.onload = function() {
13-
var positioner = new maxkir.CursorPosition($('text_area'), 7);
13+
var positioner1 = new maxkir.CursorPosition($('text_area'), 7);
1414
$('text_area').observe("click", function(e) {
15-
var child_pos = positioner.getPixelCoordinates();
16-
//alert(positioner.getCursorCoordinates())
15+
var child_pos = positioner1.getPixelCoordinates();
16+
// alert(positioner1.getCursorCoordinates())
1717
var t_pos = $('text_area').cumulativeOffset();
1818
$('pointer').style.left = (t_pos.left + child_pos[0]) + "px";
1919
$('pointer').style.top = (t_pos.top + child_pos[1]) + "px";
2020
});
21-
var positioner = new maxkir.CursorPosition($('text_field'), 7);
21+
var positioner2 = new maxkir.CursorPosition($('text_field'), 7);
2222
$('text_field').observe("click", function(e) {
23-
var child_pos = positioner.getPixelCoordinates();
24-
//alert(positioner.getCursorCoordinates())
25-
var t_pos = $('text_field').cumulativeOffset();
23+
var child_pos = positioner2.getPixelCoordinates();
24+
var t_pos = $('text_field').cumulativeOffset();
2625
$('pointer').style.left = (t_pos.left + child_pos[0]) + "px";
2726
$('pointer').style.top = (t_pos.top + child_pos[1]) + "px";
2827
});
@@ -51,4 +50,4 @@ <h2>Click into the textarea below. The red square should follow the place of the
5150

5251
<input type="text" id="text_field" size="90" value="sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.">
5352
</body>
54-
</html>
53+
</html>

0 commit comments

Comments
 (0)