aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascripts/prototype.js
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascripts/prototype.js')
-rw-r--r--actionpack/lib/action_view/helpers/javascripts/prototype.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js
index a76d3e62b6..9225f13125 100644
--- a/actionpack/lib/action_view/helpers/javascripts/prototype.js
+++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js
@@ -221,11 +221,12 @@ Ajax.Request.prototype = (new Ajax.Base()).extend({
},
setRequestHeaders: function() {
- var requestHeaders = ['X-Requested-With', 'XMLHttpRequest',
+ var requestHeaders = [
+ 'X-Requested-With', 'XMLHttpRequest',
'X-Prototype-Version', Prototype.Version];
if (this.options.method == 'post')
- requestHeaders.push('Connection', 'close',
+ requestHeaders.push(//'Connection', 'close',
'Content-type', 'application/x-www-form-urlencoded');
if (this.options.requestHeaders)
@@ -987,8 +988,10 @@ var Position = {
clone: function(source, target) {
source = $(source);
target = $(target);
- target.style.top = source.style.top;
- target.style.left = source.style.left;
+ target.style.position = 'absolute';
+ var offsets = this.cumulativeOffset(source);
+ target.style.top = offsets[1] + 'px';
+ target.style.left = offsets[0] + 'px';
target.style.width = source.offsetWidth + 'px';
target.style.height = source.offsetHeight + 'px';
}