Ticket #6462 (closed defect: fixed)

Opened 8 months ago

Last modified 7 months ago

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

Reported by: josh@… Owned by: doughays
Priority: high Milestone: 1.2
Component: Dijit - LnF Version: 1.1.0
Severity: normal Keywords: DateTextbox firefox rendering month buttons css
Cc:

Description (last modified by bill) (diff)

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

datetime.png (13.3 kB) - added by guest 8 months ago.

Change History

Changed 8 months ago by guest

  Changed 8 months ago by bill

  • cc josh@… removed
  • owner set to doughays
  • reporter changed from guest to josh@trutwins.homeip.net
  • description modified (diff)
  • summary changed from DateTextBox rendering on FF2 to DateTextBox: 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?

  Changed 8 months ago by doughays

  • status changed from new to closed
  • resolution set to worksforme

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

  Changed 7 months ago by guest

  • status changed from closed to reopened
  • resolution deleted

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

follow-up: ↓ 6   Changed 7 months ago by doughays

  • milestone set to 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.

  Changed 7 months ago by doughays

  • component changed from Dijit to Dijit - LnF

in reply to: ↑ 4   Changed 7 months 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

follow-up: ↓ 8   Changed 7 months ago by 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.

in reply to: ↑ 7   Changed 7 months 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

follow-up: ↓ 10   Changed 7 months ago by doughays

  • status changed from reopened to closed
  • resolution set to fixed

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">

in reply to: ↑ 9   Changed 7 months 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.