Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6462 closed defect (fixed)

DateTextBox: month back/forward buttons don't show up correctly (FF2)

Reported by: josh@… Owned by: Douglas Hays
Priority: high Milestone: 1.2
Component: Dijit - LnF Version: 1.1.0
Keywords: DateTextbox firefox rendering month buttons css Cc:
Blocked By: Blocking:

Description (last modified by bill)

Have an odd rendering problem with FF2 and DateTextbox on dojo 1.1.

The month back button does not appear and the month forward button is offset up and to the right:

My DateTextbox is created as so:

<input type="text" 
   id="field_2300" 
   name="osha_expires_8_2300" 
   size="10" 
   value="2008-08-30T00:00:00"  
   dojoType="dijit.form.DateTextBox" 
   style="width: 90px;" 
   constraints="{datePattern: 'MM/dd/yyyy'}" 
   invalidMessage="Invalid Date."  
   class="us_textbox">

I thought the width style might be a problem or the class attribute but still renders as described above without those.

The page also has the following:

dojo.addOnLoad(function () {
   dojo.addClass(dojo.body(), 'tundra');
   dojo.parser.parse(); 
});

I do this because I don't have control over the body tag, just a portal content.

I *thought* this working in 1.0 so not sure if something changed in 1.1.

On IE6/IE7 renders fine, only have issues on FF2 (2.0.0.13)

Let me know if need additional info.

Thanks,

Josh

Attachments (1)

datetime.png (13.3 KB) - added by guest 11 years ago.

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by guest

Attachment: datetime.png added

comment:1 Changed 11 years ago by bill

Cc: josh@… removed
Description: modified (diff)
Owner: set to Douglas Hays
Reporter: changed from guest to josh@…
Summary: DateTextBox rendering on FF2DateTextBox: month back/forward buttons don't show up correctly (FF2)

We'll need you to attach a test case for this using the "Attach File" button, as http://download.dojotoolkit.org/current-stable/dojo-release-1.1.0/dijit/tests/form/test_DateTextBox.html works correctly, right?

comment:2 Changed 11 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

Using the example in the problem description, it works for me. Please attach a self-contained test file.

comment:3 Changed 11 years ago by guest

Resolution: worksforme
Status: closedreopened

Sorry it took so long - I don't have a self-contained file. I can create one but let's check if you get the same problem on this URL first:

http://www.spiritualpaths.net/sitepages/pid2045.php?ltemplate=add_edit&pageId=2045

When viewing that page on Firefox 2.0.0.14 I get the same kind of calendar as shown above.

Thanks,

Josh

comment:4 Changed 11 years ago by Douglas Hays

Milestone: 1.2

Using the above URL, both buttons show up for me using Firefox 2.0.0.14 on WinXP. Both buttons are a little too high.

comment:5 Changed 11 years ago by Douglas Hays

Component: DijitDijit - LnF

comment:6 in reply to:  4 Changed 11 years ago by guest

Replying to doughays:

Using the above URL, both buttons show up for me using Firefox 2.0.0.14 on WinXP. Both buttons are a little too high.

I get the same picture as above using 2.0.0.14 on OpenSuSE 10.3 - looks ok in IE6/7.

Thanks, let me know if anything else I can provide.

Josh

comment:7 Changed 11 years ago by Douglas Hays

This is a Firefox 2 bug. It works OK in Firefox 3. You can verify this by popping up the Calendar and then typing ctrl+ and ctrl- to zoom the font and then unzoom it. The visual problem should then be fixed.

Please try the following patch to help me determine if there's a viable workaround. Edit dijit/_Wdiget.js, and immediately after
this.postCreate();
add:

if(this.domNode && dojo.isFF == 2){
        var node=this.domNode;
        var old = node.style.opacity;
        node.style.opacity = "0.999";
        setTimeout(dojo.hitch(this, function(){
                node.style.opacity = old;
        }), 0);
}

then rerun and see if everything works OK.

comment:8 in reply to:  7 Changed 11 years ago by guest

Replying to doughays:

This is a Firefox 2 bug. It works OK in Firefox 3. You can verify this by popping up the Calendar and then typing ctrl+ and ctrl- to zoom the font and then unzoom it. The visual problem should then be fixed.

Please try the following patch to help me determine if there's a viable workaround. Edit dijit/_Wdiget.js, and immediately after
this.postCreate();
add:

if(this.domNode && dojo.isFF == 2){
        var node=this.domNode;
        var old = node.style.opacity;
        node.style.opacity = "0.999";
        setTimeout(dojo.hitch(this, function(){
                node.style.opacity = old;
        }), 0);
}

then rerun and see if everything works OK.

doughays - sorry, patch didn't change appearance. I added a console.debug just to make sure it was running.

The _Widget.js is here in case you want to verify I put your changes in correct spot:

http://www.spiritualpaths.net/dojo1/dijit/_Widget.js

Thanks,

Josh

comment:9 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

I couldn't recreate this using the dijit trunk (1.2). Also, adding the following to the top of the HTML test file seemed to make the 1.1 version work correctly:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

comment:10 in reply to:  9 Changed 11 years ago by guest

Replying to doughays:

I couldn't recreate this using the dijit trunk (1.2). Also, adding the following to the top of the HTML test file seemed to make the 1.1 version work correctly:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

Yes, that does fix it - good catch! Thanks!

Note: See TracTickets for help on using tickets.