Opened 14 years ago
Closed 10 years ago
#8274 closed defect (wontfix)
TracWysiwyg for 0.12 broken with Chrome and Firefox 3.6
Reported by: | Joel Foner | Owned by: | Jun Omae |
---|---|---|---|
Priority: | high | Component: | TracWysiwygPlugin |
Severity: | critical | Keywords: | |
Cc: | Joel Foner, Russ Tyndall | Trac Release: | 0.12 |
Description (last modified by )
It appears that the WYSIWYG option is not set up properly for the ticket body with Chrome and Firefox 3.6.
Editing in WYSIWYG mode works reasonably in comments, but in the body of the ticket itself, there are two issues:
- styling of the radio buttons places the wysiwyg button in a place where you will often get another item rather than the radio button activation (trivially fixed by user by clicking on the "wysiwyg" text, but a bit of an irritant
- the blocker is that with these two browsers, going into wysiwyg mode disables editing of the ticket body textbox area
Attachments (1)
Change History (12)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
Changed 14 years ago by
Attachment: | screenshot-1.png added |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
This is happening for me in FF 3.6.13, FF 4.0b8, and Chrome running Trac 0.12.1. Creating a new ticket, the wysiwyg box is locked, and switching to the textarea radio button and back throws the following
Stacktrace in FireBug:
selection is null getNativeSelectionRange() - wysiwyg.js (line 3250) getSelectionPosition() - wysiwyg.js (line 3344) selectionChanged() - wysiwyg.js (line 1330) lazy() - wysiwyg.js (line 735) [Break On This Error] return selection.rangeCount > 0 ? selection.getRangeAt(0) : null; wysiwyg.js (line 3250)
comment:4 Changed 14 years ago by
After enabling and disabling other plugins, it seems there is a conflict with the TimingAndEstimationPlugin. This error only happens when the TicketPropsLayoutChanger is enabled.
comment:5 Changed 14 years ago by
This is also reproducible with package combination listed in #8716 :
Python-2.7.1
Trac-0.12.2-py2.7
TracWysiwyg-0.12.0.3_r9676-py2.7
timingandestimationplugin-1.1.2b-py2.7
Tested with different browsers (Seamonkey, Chrome, Opera, Firefox 3.6&4)
comment:6 Changed 14 years ago by
Component: | TracWysiwygPlugin → TimingAndEstimationPlugin |
---|---|
Owner: | changed from Jun Omae to Russ Tyndall |
comment:7 Changed 14 years ago by
Cc: | Russ Tyndall added |
---|---|
Component: | TimingAndEstimationPlugin → TracWysiwygPlugin |
Owner: | changed from Russ Tyndall to Jun Omae |
Well I wasnt able to track down why the error only occurs when the TicketPropsLayoutChanger is enabled, but by changing the getNativeSelectionRange js function I was able to prevent the "disabled" component bug (javascript errors).
-
tracwysiwyg/htdocs/wysiwyg.js
3247 3247 }; 3248 3248 TracWysiwyg.prototype.getNativeSelectionRange = function() { 3249 3249 var selection = this.contentWindow.getSelection(); 3250 return selection .rangeCount > 0 ? selection.getRangeAt(0) : null;3250 return selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : null; 3251 3251 }; 3252 3252 TracWysiwyg.prototype.expandSelectionToElement = function(arg) { 3253 3253 if (arg.start || arg.end) {
The TicketPropsLayoutChanger just removes/compacts empty table cells and rows out of the ticket properties tables (I didnt write it, and its not super well commented, but reading through, it seems correctish and has been working till now). It also doesnt seem to affect the description box other than to remove it and re-add it to the dom. I am not sure what it is using selection for, or why the selection would be null in some browsers after affecting the dom, so i cannot speculate on if this fix is "correct", only that it seems to fix the most obvious and immediate bug.
Please let me know if you need further help with this. I believe the style bug is related to default font widths, but I think the solution probably involves float boundaries. Either way the style bug seems unrelated to T&E
Cheers, Russ
comment:8 Changed 13 years ago by
I'm having problems with TracWysiwyg for 0.11 in Chrome and Firefox as well. It seems to be related to a problem while loading jquery, since I'm getting a 404 error when trying to GET jquery.js.
comment:9 Changed 13 years ago by
I just solved the problem by copying jquery.js into /usr/lib/python2.6/dist-packages/trac/htdocs/js and it seems to be working properly so far.
comment:10 Changed 13 years ago by
I was able to fix the conflict with the Timing and Estimation plugin by making a quick edit to its whitespace_remover.js file. This of course means that if both plugins are enabled, there may be some extra whitespace in the Modify Ticket table, but at least the wysiwyg editor works.
timingandestimationplugin/htdocs/whitespace_remover.js 49c50 < $('#properties table').cleanupTable(); --- > if ($('#properties table').find('iframe.wysiwyg').length == 0) $('#properties table').cleanupTable();
comment:11 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I have no plan to modify tracwysiwygplugin for the issue.
Works for me with
Trac-0.12.2dev
,TracWysiwyg-0.12.0.3-r9387
andFirefox 3.6.12
.