Bug 465721 Space shouldn't scroll the page if something is focused in it r=Mnyromyr

This commit is contained in:
Neil Rashbrook 2008-12-09 22:51:47 +00:00
Родитель 9b9e1f47b1
Коммит b688a0e70d
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -1893,12 +1893,17 @@ function MsgAddAllToAddressBook() {}
function SpaceHit(event)
{
var contentWindow = window.top.content;
var rssiframe = contentWindow.document.getElementById('_mailrssiframe');
var contentWindow = document.commandDispatcher.focusedWindow;
if (contentWindow.top == window)
contentWindow = content;
else if (document.commandDispatcher.focusedElement &&
!hrefAndLinkNodeForClickEvent(event))
return;
var rssiframe = content.document.getElementById('_mailrssiframe');
// If we are displaying an RSS article, we really want to scroll
// the nested iframe.
if (rssiframe)
if (contentWindow == content && rssiframe)
contentWindow = rssiframe.contentWindow;
if (event && event.shiftKey) {