Open Bug 253078 Opened 20 years ago Updated 3 years ago

[Midas] image drag handles misplaced when body relatively positioned (etc.)

Categories

(Core :: DOM: Editor, defect, P5)

x86
Windows XP
defect

Tracking

()

People

(Reporter: jorgen, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

See URL above. If the body tag has a border style attribute set, the drag 
handles for images are drawn at the wrong location.
I guess the position of the drag handles should be something like: position - 
body.style.border

Reproducible: Always
Steps to Reproduce:
1. Set a border to the body element
2. Click on the image in the upper left corner
3.

Actual Results:  
Drag handles drawn at the wrong location
Attached file Minimal testcase
It seems to be happening because the body has style position:relative and a
large border-width.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attached patch patchSplinter Review
Well, this is how I solved this bug some time ago.
This won't compile directly, I missed a header file, if I remember correctly.
This patch solves the bug in principle, but see this discussion:
http://groups.google.nl/groups?hl=nl&lr=&client=firefox-a&rls=org.mozilla:en-US:official&frame=right&th=6b99f9ff0628bf59&seekm=41090e42%240%2434762%24e4fe514c%40news.xs4all.nl#link1
*** Bug 284715 has been marked as a duplicate of this bug. ***
QA Contact: bugzilla → editor
Assignee: mozeditor → nobody
A fix for this bug is more now more important than ever since the new contentEditable mode will most likely produce this issue since most sites/pages use some margin/padding/border on it's containers to position the editable area.
Flags: blocking1.9?
Resummarizing to reflect that this bug happens whenever an absolutely positioned element that is a child of the body is placed relative to body or html rather than relative to the viewport (and the thing it's placed relative to isn't at (0,0) in the viewport).

It could also be fixed by subtracting the viewport offset of the body.  And I'd note that even the root element could be relatively positioned and have border, so Martijn's fix doesn't quite cover all cases.
Summary: [Midas] Drag handles of image are drawed on the wrong location → [Midas] image drag handles misplaced when body relatively positioned (etc.)
Flags: blocking1.9? → blocking1.9-
There seems to be an issue with the scrolling of the page too. Check this URL if you select the image it's resize handles will be placed at incorrect positions, the same distance as the scroll height.

http://tinymce.moxiecode.com/gecko/resize_handles.htm

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority and severity.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: