Closed Bug 348469 Opened 18 years ago Closed 8 years ago

hint should be shown at pointer

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: surkov, Unassigned)

References

Details

Attachments

(1 file)

It's not usual to see hint what is shown in static coords relative control. I guess it's better to show it at mouse pointer.

We can try the next:
1) Since nsXFormsStubControl handles user events to dispatch 'xforms-hint' event then I guess it can store mouse pointer coords and then message can get these coords from it.

or 2) Can we use standard tooltip implementation?
Attached patch testcaseSplinter Review
It would be nice if we could get this for free by doing something in our xbl control to get tooltips like HTML does.  I wouldn't think we would have to do our own positioning.
(In reply to comment #2)
> It would be nice if we could get this for free by doing something in our xbl
> control to get tooltips like HTML does.  I wouldn't think we would have to do
> our own positioning.
> 

We have common code in nsXFomrsMessageElement for position calculating of message[level="empheral"] and hint. Should we use tooltip positioning for message[level="empheral"] too? If true then I agree it would be fine if we will use tooltip logic for our messages showing.
(In reply to comment #3)
> (In reply to comment #2)
> > It would be nice if we could get this for free by doing something in our xbl
> > control to get tooltips like HTML does.  I wouldn't think we would have to do
> > our own positioning.
> > 
> 
> We have common code in nsXFomrsMessageElement for position calculating of
> message[level="empheral"] and hint. Should we use tooltip positioning for
> message[level="empheral"] too? If true then I agree it would be fine if we will
> use tooltip logic for our messages showing.
> 


I don't see a problem with it.  You might want to ask Olli about it, though.  Maybe there is a reason that he did what he did.
The problem to show hint where pointer is is that hint event may be dispatched
also manually. Where should the tooltip be then?
(In reply to comment #5)
> The problem to show hint where pointer is is that hint event may be dispatched
> also manually. Where should the tooltip be then?
> 

Then we should distinguish events. nsXFormsStubControl can remember x and y position during hint sending, when hint end tree walking, then stubcontrol forget x and y. That will allow us to keep separated hint events from user interaction and syntetic hint events.
Blocks: 349667
Firefox 2.0.0.14 Xforms 0.8.5
Whenever a label is set to float:right or float:left, the hint does not appear near the mouse pointer or label, but off to the far right or left of the form.

Whenever there is no float set on the xforms-label, it works perfectly.
Quite by accident I noticed that when floating the xforms-label left or right, that when I add a span element inside it, the hint shows by the pointer as expected. like so:
<xf:label><span>Label Name</span></xf:label>

maybe this will somehow help you in identifying and solving the problem.
RIP xforms
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: