diff --git a/CHANGES b/CHANGES index 2f3ac58f2..2c5d5b562 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,8 @@ Version 0.8.4 context local objects on a stack with context preservation on errors. - Fixed an issue with scolling up in the debugger. +- Fixed an issue with debuggers running on a different URL + than the URL root. - Fixed a problem with proxies not forwarding some rarely used special methods properly. - Added a workaround to prevent the XSS protection from Chrome diff --git a/werkzeug/debug/shared/debugger.js b/werkzeug/debug/shared/debugger.js index 3d21a4ab6..73305bf06 100644 --- a/werkzeug/debug/shared/debugger.js +++ b/werkzeug/debug/shared/debugger.js @@ -44,7 +44,7 @@ $(function() { .click(function() { sourceView.slideUp('fast'); }); - $.get(document.location.pathname, {__debugger__: 'yes', cmd: + $.get('', {__debugger__: 'yes', cmd: 'source', frm: frameID, s: SECRET}, function(data) { $('table', sourceView) .replaceWith(data); @@ -134,7 +134,7 @@ function openShell(consoleNode, target, frameID) { var form = $('
>>>
') .submit(function() { var cmd = command.val(); - $.get(document.location.pathname, { + $.get('', { __debugger__: 'yes', cmd: cmd, frm: frameID, s: SECRET}, function(data) { var tmp = $('
').html(data); $('span.extended', tmp).each(function() { @@ -178,7 +178,7 @@ function openShell(consoleNode, target, frameID) { return false; } }); - + return consoleNode.slideDown('fast', function() { command.focus(); }); @@ -196,5 +196,6 @@ function focusSourceBlock() { line = tmp; } var container = $('div.sourceview'); - container.scrollTop(line.offset().top); + + container.scrollTop(line.offset().top - container.offset().top + container.scrollTop()); }