Closed Bug 70425 Opened 24 years ago Closed 23 years ago

CreatePopup does not handle alignment, etc.

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: murphy, Assigned: mikepinkerton)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.9) Gecko/20010227
BuildID:    2001022705

for <popup>.openPopup ( element, x , y , popupType, anchor, align )

anchor alignment and popup alignment do not appear to be handled at all. See the
link to the CreatePopup function.

This causes a default to bottomleft and topleft when the popup is opened.

Also, unless x and y are set to -1, the popup appears in upper-left part of screen.

Finally, it would be nice if the binding method could capture the cursor
position and use it when an anchor value is not specified.



Reproducible: Always
Steps to Reproduce:
   dn = function() { test = document.getElementById('test'); 
                       ele  = document.getElementById('pop'); 
                       ele.openPopup ( test, -1  , -1 ,
'popup','topright','bottomleft') }
Attached file tips.xul
Thanks Eric!  ->pink to consider patch, targetting moz0.9.1 
Assignee: trudelle → pinkerton
Target Milestone: --- → mozilla0.9.1
Confirming, setting keyword "testcase".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
patch? there's no patch here.
Target Milestone: mozilla0.9.1 → mozilla1.0
Leaving my mark so I remember to try and help pink out.
I think this one is now fixed with the new XUL 1.0 changes.  See
http://www.mozilla.org/projects/xul/tests/popups.xul for examples of how to
setup popup's with XUL 1.0
I'll verify if this has been fixed. I need to do some testing first.
Nope, still not fixed:
openPopup (test,-1,-1,'popup','bottomright','bottomright')

These last two attributes are simply not being processed correctly. BTW, what
are the -1,-1 for anyway?
Hyatt,

Is this how you still call a openPopup()?
See

http://lxr.mozilla.org/seamonkey/source/xpfe/global/resources/content/bindings/p
opup.xml#23

Something along the way is ignoring the anchor and alignment flags, hardcoding 
them to the defaults.  If I have time next week, I'll try and walk through it.
bottomright, bottomright is not a valid popup position.  Look at the XUL spec to
see the 11 valid positions.  This is one of the reasons I'm switching to a
single variable called position.  Anchor and alignment confuse people into
trying combinations that aren't valid.

This bug is actually fixed.  There is another bug to add show/HidePopup to the
popup elt.  You shouldn't ever need to call openPopup or createPopup once those
are in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: