Fix for bug 388659 (Links become undraggable when document contains contenteditable element). r/sr=roc, a=beltzner.

This commit is contained in:
peterv%propagandism.org 2008-04-18 13:27:02 +00:00
Родитель f152197e7c
Коммит 57b7205dd6
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -1788,18 +1788,19 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
nsInputEvent* keyEvent = (nsInputEvent*)aEvent;
if (!isEditor && !keyEvent->isAlt) {
if (!keyEvent->isAlt) {
for (nsIContent* content = mContent; content;
content = content->GetParent()) {
if ( nsContentUtils::ContentIsDraggable(content) ) {
if (nsContentUtils::ContentIsDraggable(content) &&
!content->IsEditable()) {
// coordinate stuff is the fix for bug #55921
if ((mRect - GetPosition()).Contains(
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this)))
return NS_OK;
}
}
} // if browser, not editor
}
// check whether style allows selection
// if not, don't tell selection the mouse event even occurred.