Closed Bug 334503 Opened 19 years ago Closed 18 years ago

Datepicker control not available for XUL

Categories

(Core Graveyard :: XForms, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bernd.fruechtnicht, Assigned: surkov)

References

Details

(Keywords: fixed1.8.0.8, fixed1.8.1.1)

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

Have something like the following (with proper PIs, namespace decl., etc.), then click on the datepicker:

<xul:window>
<xf:model id="model">
  <xf:instance>
    <example xmlns="">
      <date>2006-11-25</date>
    </example>
  </xf:instance>
  <xf:bind nodeset="/example/date" id="date" type="xsd:date"/>
</xf:model>

<xf:input bind="date">
  <xf:label>Date:</xf:label>
</xf:input>
</xul:window>

Reproducible: Always

Steps to Reproduce:
Just click on the datepicker of an xf:input embedded in a xul document
Actual Results:  
Firefox crashes due to access violation

Expected Results:  
Show datepicker

Version 0.4 of xforms basically worked, but layout was broken (datepicker was  displayed inline instead of as a popup).
testfile for reproducing the bug
Attachment #218843 - Attachment mime type: text/plain → application/vnd.mozilla.xul+xml
I confirmed that on 0.5 and 1.5.0.2, this does crash when you click on the datepicker button to trigger the dropdown.

However, a change has since gone into the trunk to handle xsd:date for inputs only inside xhtml.  XUL will, for now, just show a generic XUL textbox.  So this doesn't crash on trunk.  We were probably binding in the xhtml datepicker control and doing some xhtml specific stuff which is causing the crash.

I'm changing the title of this bug to reflect the fact that we don't have a datepicker on XUL.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Within xul an xforms:input for date crashes firefox when clicking datepicker → Datepicker control not available for XUL
Severity: critical → normal
Assignee: aaronr → surkov
Depends on: 330641
Severity: normal → enhancement
Blocks: 327236
OS: Windows XP → All
Hardware: PC → All
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
I was prostrate after long-drawn fight with nested popups (bug 336179). Therefore I removed popups from calendar widget.
Attachment #229454 - Flags: review?(doronr)
Comment on attachment 229454 [details] [diff] [review]
patch

>Index: extensions/xforms/resources/content/widgets-xul.xml
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/widgets-xul.xml,v
>retrieving revision 1.1
>diff -u -8 -p -r1.1 widgets-xul.xml
>--- extensions/xforms/resources/content/widgets-xul.xml	24 May 2006 11:49:04 -0000	1.1
>+++ extensions/xforms/resources/content/widgets-xul.xml	17 Jul 2006 11:13:23 -0000
>@@ -202,29 +202,35 @@
>   </binding>
> 
> 
>   <!-- FULL CALENDAR -->
>   <binding id="calendar-full" extends="#calendar-compact">
>     <content orient="vertical">
>       <xul:hbox>
>         <!-- month selection section -->
>-        <xul:menulist anonid="months-list">
>-          <xul:menupopup/>
>-        </xul:menulist>
>-        <xul:vbox class="control-month-buttons-box">
>-          <xul:toolbarbutton anonid="prevmonth-btn" class="toolbarbutton-up"
>-            tooltiptext="&xforms.datepicker.prevMonth.title;"/>
>-          <xul:toolbarbutton anonid="nextmonth-btn" class="toolbarbutton-dn"
>-            tooltiptext="&xforms.datepicker.nextMonth.title;"/>
>-        </xul:vbox>
>+        <xul:hbox class="list" flex="1">
>+          <xul:description anonid="months-label" readonly="true" flex="1"/>
>+          <xul:vbox class="control-buttons-box">
>+            <xul:toolbarbutton anonid="prevmonth-btn" class="toolbarbutton-up"
>+              tooltiptext="&xforms.datepicker.prevMonth.title;"/>

I usually prefer attributes to be aligned:

<xul:foo bar="" ...
         eek=""

Makes it more readable
Attachment #229454 - Flags: review?(doronr) → review+
Attached patch patch2 (obsolete) — Splinter Review
(In reply to comment #4)

> I usually prefer attributes to be aligned:
> 
> <xul:foo bar="" ...
>          eek=""
> 
> Makes it more readable
> 

Sorry, I forgot about it.
Attachment #229454 - Attachment is obsolete: true
Attachment #229671 - Flags: review?(aaronr)
Comment on attachment 229671 [details] [diff] [review]
patch2

I don't see anything wrong with the code in the patch, but when I applied the patch and tried to use it with the attached testcase, I don't see a dropdown button for the date input unless I happen to mouse over it.  And even then there is no image on it.

So I'm r-'ing until the button is there.  The calendar widget worked great except for that, though.  Very cool!
Attachment #229671 - Flags: review?(aaronr) → review-
Attached patch patch3Splinter Review
(In reply to comment #6)
> (From update of attachment 229671 [details] [diff] [review] [edit])
> I don't see anything wrong with the code in the patch, but when I applied the
> patch and tried to use it with the attached testcase, I don't see a dropdown
> button for the date input unless I happen to mouse over it.  And even then
> there is no image on it.
> 
> So I'm r-'ing until the button is there.  The calendar widget worked great
> except for that, though.  Very cool!
> 

I guess the problem on fx1.5 only. I fixed styles issue you pointed me.

Though calendar looks strange on my fx in general.
Attachment #229671 - Attachment is obsolete: true
Attachment #229840 - Flags: review?(aaronr)
Comment on attachment 229840 [details] [diff] [review]
patch3

This control doesn't obey any of the accessibility keyboard shortcuts that the xhtml hosted xf calendar control does.  Please open a bug so that we can eventually fix this problem.  With that,  r=me.
Attachment #229840 - Flags: review?(aaronr) → review+
(In reply to comment #8)
> (From update of attachment 229840 [details] [diff] [review] [edit])
> This control doesn't obey any of the accessibility keyboard shortcuts that the
> xhtml hosted xf calendar control does.  Please open a bug so that we can
> eventually fix this problem.  With that,  r=me.
> 

I filed bug 345224.
checked into trunk for surkov
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
checked into 1.8.0 branch on 2006/09/21
Keywords: fixed1.8.0.8
checked into 1.8 branch on 2006/11/21
Keywords: fixed1.8.1.1
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: