Webapp runtime does not show tooltips

RESOLVED FIXED in Firefox 29

Status

defect
P2
normal
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: jeroen, Assigned: jeroen)

Tracking

26 Branch
Firefox 29
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131206145833

Steps to reproduce:

Install a desktop web app with tooltips (i.e. the HTML code includes title attributes).

Example app with tooltips on controls: http://calculabo.eu


Actual results:

When after installation, the app is run through the webapp runtime, the tooltips are not shown when hovering a control.


Expected results:

The application should show tooltips, identical to what happens when the same page is opened in the browser.
I checked and observed the problem on Ubuntu as well as Windows XP.

Solution is probably simple extension of webapprt/content/webapp.xul with a tooltip element linked to the browser element:
https://developer.mozilla.org/en-US/docs/XUL/Attribute/tooltip.page
Blocks: 725408
OS: Linux → All
Hardware: x86 → All
Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
No longer blocks: 725408
Depends on: 725408
Component: Startup and Profile System → Webapp Runtime
Product: Toolkit → Firefox
Posted patch patch.patch (obsolete) — Splinter Review
This patch enables tooltips in webapps.

This is my first code contribution to Mozilla; although building Firefox on my machine did not work, I tested the patch by placing an override in my chrome manifest, and the patch successfully fixed the bug.
Attachment #8362163 - Flags: review?(myk)
Comment on attachment 8362163 [details] [diff] [review]
patch.patch

Review of attachment 8362163 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you Jeroen.
I'm not sure this handles the case when there is a location change (the tooltip should be hidden when the location changes, see http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#3609).

You could ask in the introduction channel how to start building Mozilla code, it's really simple using mach (https://developer.mozilla.org/en-US/docs/Simple_Firefox_build).
Attachment #8362163 - Flags: feedback+
(In reply to Marco Castelluccio [:marco] from comment #3)
> I'm not sure this handles the case when there is a location change (the
> tooltip should be hidden when the location changes, see
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> js#3609).
Good catch. The patch needs some additional JavaScript to detect this to remove the tooltip in that case. (Hold your mouse on the info icon in my calculator app for three seconds a tooltip-preserving redirect to my homepage, where the normal Firefox browser would close the tooltip.)

Also, when looking at the code you pointed at, I found some other relevant stuff here on lines 131-145:
https://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.xul#131
* Formfill/password manager support does not seem relevant for webapprt, as apps will probably store credentials themselves e.g. in cookies, so this does not seem important to add now.
* Web apps have no url bar, so also no autocomplete in the url bar. :)
* What is ContentSelectDropdown for? Webapprt does not have it yet select elements function properly. (In my calculator app, click the settings icon and use the select dropdown.) Also, XUL tabbrowser element does not have a documented selectpopup attribute. [https://developer.mozilla.org/en-US/docs/XUL/tabbrowser]
* The webapprt indeed does not have form validation error popups. Lacking a mechanism to display errors, it apparently just submits the form. (In my calculator app, click the settings icon and try to set the output to base-1.) I'll try to add that to my patch as well.

> You could ask in the introduction channel how to start building Mozilla
> code, it's really simple using mach
> (https://developer.mozilla.org/en-US/docs/Simple_Firefox_build).
Thanks, but as the chrome manifest override works properly for testing solutions for this bug, I'll stick with that. :)
Summary: Webapp runtime does not show tooltips → Webapp runtime does not show tooltips and form validation error popups
(In reply to Jeroen van der Gun from comment #4)
> (In reply to Marco Castelluccio [:marco] from comment #3)
> > I'm not sure this handles the case when there is a location change (the
> > tooltip should be hidden when the location changes, see
> > http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> > js#3609).
> Good catch. The patch needs some additional JavaScript to detect this to
> remove the tooltip in that case. (Hold your mouse on the info icon in my
> calculator app for three seconds a tooltip-preserving redirect to my
> homepage, where the normal Firefox browser would close the tooltip.)
> 
> Also, when looking at the code you pointed at, I found some other relevant
> stuff here on lines 131-145:
> https://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> xul#131
> * Formfill/password manager support does not seem relevant for webapprt, as
> apps will probably store credentials themselves e.g. in cookies, so this
> does not seem important to add now.
> * Web apps have no url bar, so also no autocomplete in the url bar. :)
> * What is ContentSelectDropdown for? Webapprt does not have it yet select
> elements function properly. (In my calculator app, click the settings icon
> and use the select dropdown.) Also, XUL tabbrowser element does not have a
> documented selectpopup attribute.
> [https://developer.mozilla.org/en-US/docs/XUL/tabbrowser]
> * The webapprt indeed does not have form validation error popups. Lacking a
> mechanism to display errors, it apparently just submits the form. (In my
> calculator app, click the settings icon and try to set the output to
> base-1.) I'll try to add that to my patch as well.

You can also split the work in different bugs and just fix the tooltips here ;)
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Marco Castelluccio [:marco] from comment #5)
> You can also split the work in different bugs and just fix the tooltips here
> ;)

You are probably right, as the form validation popup involves quite some code. And my limited Firefox development experience cannot make it work. I filed bug 961502 for someone else to pick that up.

I'll post the revised tooltip patch here soon.
Summary: Webapp runtime does not show tooltips and form validation error popups → Webapp runtime does not show tooltips
Posted patch patch v2 (obsolete) — Splinter Review
Tooltips now also close on location change
Attachment #8362163 - Attachment is obsolete: true
Attachment #8362163 - Flags: review?(myk)
Attachment #8362275 - Flags: review?(tabraldes)
Priority: -- → P2
Comment on attachment 8362275 [details] [diff] [review]
patch v2

I'm not super familiar with the code that was adapated from browser.js. Felipe (or another Fx front-end dev) should probably take a look
Attachment #8362275 - Flags: review?(tabraldes) → review?(felipc)
Attachment #8362275 - Flags: review?(felipc) → review+
Posted patch patch v2Splinter Review
Added reviewer name to commit message.
Attachment #8362275 - Attachment is obsolete: true
Attachment #8364498 - Flags: review+
Attachment #8364498 - Flags: checkin?
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/7d6daa084033
Assignee: nobody → jeroen
Status: NEW → ASSIGNED
Flags: in-testsuite?
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7d6daa084033
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.