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 06:27:02 -07:00
Родитель 3b6806fd74
Коммит 72957354f8
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.