CreatePopup does not handle alignment, etc.

RESOLVED FIXED in mozilla1.0

Status

()

RESOLVED FIXED
18 years ago
11 years ago

People

(Reporter: murphy, Assigned: mikepinkerton)

Tracking

({testcase})

Trunk
mozilla1.0
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

867 bytes, text/plain
Details
(Reporter)

Description

18 years ago
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') }
(Reporter)

Comment 1

18 years ago
Created attachment 26368 [details]
tips.xul

Comment 3

18 years ago
Thanks Eric!  ->pink to consider patch, targetting moz0.9.1 
Assignee: trudelle → pinkerton
Target Milestone: --- → mozilla0.9.1

Comment 4

18 years ago
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

Comment 6

18 years ago
Leaving my mark so I remember to try and help pink out.

Comment 7

18 years ago
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

Comment 8

18 years ago
I'll verify if this has been fixed. I need to do some testing first.

Comment 9

18 years ago
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?

Comment 10

18 years ago
Hyatt,

Is this how you still call a openPopup()?

Comment 11

18 years ago
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.

Comment 12

18 years ago
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
Last Resolved: 18 years ago
Resolution: --- → FIXED

Updated

11 years ago
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.