#6778 closed defect (duplicate)
Custom checkbox field not selectable in IE
Reported by: | Owned by: | Matthew Good | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | report system | Version: | 0.10.4 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I have added a custom ticket field which is a simple checkbox by adding the following section to the trac.ini:
[ticket-custom] tested = checkbox tested.label = Testing completed tested.value = 0
When using the Custom Query this field is available for selection from the Add Filter combo box. If you are using Internet Explorer (only tested using IE7) the field appears with radio buttons for Yes and No but they are not selectable.
When the update button is clicked the fields options disappear, even though any other selected fields remain visible.
Adding this filter works fine with Firefox, the Yes and No options are both selectable and remain visible after an update.
Attachments (1)
Change History (5)
follow-up: 4 comment:1 by , 17 years ago
Milestone: | → 0.11.1 |
---|
comment:2 by , 17 years ago
Looks like it:
http://webbugtrack.blogspot.com/2007/10/bug-235-createelement-is-broken-in-ie.html
This modification makes it work:
-
trac/htdocs/js/query.js
130 130 131 131 // Convenience function for creating an <input type="radio"> 132 132 function createRadio(name, value, id) { 133 var input = document.createElement("input"); 133 if (!$.browser.msie) { 134 var input = document.createElement("input"); 135 } else { 136 var input = document.createElement('<input name="'+name+'"/>'); 137 } 134 138 input.type = "radio"; 135 139 if (name) input.name = name; 136 140 if (value) input.value = value;}}}
Should we update the js createElement()
code to use this quirky workaround, or any better ideas? Does jQuery contain a useful multi-browser 'create' method? Hmm. I better start reading up on jQuery, I suppose…
comment:3 by , 17 years ago
Milestone: | 0.11.1 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Turns out to be a duplicate - not surprising really as the bug seems to have been there for a long time.
Closing as duplicate of #3014.
by , 17 years ago
Attachment: | trac-ie-dynamic-radio-fix.diff added |
---|
revised radio button creation using innerHTML
comment:4 by , 17 years ago
oops. wrong ticket.
btw, osimons- the jQuery syntax for element creation is simply $('<input type="radio" name="foo"/>) — It's just putting a string of abitrary html as the primary argument. It'll be constructed into the neccessary DOM nodes. IMO, it wouldn't work well here unless we redid a big chunk of it.
The Trac javascript code creates the table elements and the various fields as required. I have reviewed the relevant parts, and it looks correct and behaves correctly in Firefox as you say.
However, viewing the DOM source with IE Developer Toolbar it shows this - clearly missing the
name="tested"
attribute that is supposed to name and group these two radio buttons:Tested using an up-to-date IE7. Verified bug using 0.11b1+, so it is not related to Trac version.
It feels like (another) IE bug…