Opened 10 years ago

Closed 8 years ago

Last modified 7 years ago

#10427 closed defect (fixed)

[patch][ccla] hilitecolor inconsistent behaviour on FF

Reported by: jfcunat Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.7
Component: Editor Version: 1.4.0b
Keywords: editor hilitecolor Cc: emorvillez.ext@…, Jared Jurkiewicz
Blocked By: Blocking:

Description

With FF3.x and the dijit._editor.plugins.TextColor? you can only select a text and then choose a hilite color.

With other browsers you can do the same but you can also first choose a hilitecolor and then type characters. These characters will have the correct hilite color. With FF, when you choose first hilitecolor and then type, characters remains with no hilitecolor.

This can be seen in http://downloads.dojotoolkit.org/release-1.4.0rc1/dojo-release-1.4.0rc1/dijit/tests/editor/test_Editor.html in 4th editor

This is related to #10096 but the fix is not complete.

This can be solved by keeping styleWithCSS true until the first character is typed. Doing so allows FF to create the span where the hilitecolor applies

See proposed patch. By this way the general behaviour of the Editor is kept and the hilite color is working better on FF. The only thing is that for hilite color, FF will create <span> instead of <font> tag. But this is the only way to have the editor behaviour consistent across browsers

Attachments (1)

patch_RichText.txt (763 bytes) - added by jfcunat 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by jfcunat

Attachment: patch_RichText.txt added

comment:1 Changed 10 years ago by Adam Peller

Cc: Jared Jurkiewicz added
Component: DijitEditor
Summary: Editor : hilitecolor inconsistent behaviour on FF[patch][ccla] hilitecolor inconsistent behaviour on FF

comment:2 Changed 10 years ago by bill

Milestone: 1.51.6
Owner: set to Jared Jurkiewicz

Jared, maybe you can take a look for 1.6.

I would hope there would be a better way than connecting to onkeyup as that won't catch things like pasting text (via the context menu)... although not sure if that will work w.r.t. background color/highlight color in any case (on any browser).

comment:3 Changed 10 years ago by Jared Jurkiewicz

Milestone: 1.6future

comment:4 Changed 8 years ago by Jared Jurkiewicz

Milestone: future1.7
Resolution: fixed
Status: newclosed

Fixed in: [25599]

comment:5 Changed 8 years ago by dmeunier

This bug seems to be still present in dojo 1.7. But it appear only the first time we try to write text with hiliteColor.

comment:6 Changed 7 years ago by bill

I don't know, it works for me, tested on the latest firefox on IE8 on Windows XP, using the fourth editor in dijit/tests/editor/test_Editor.html. I tried it with the trunk code and the latest code from the 1.7 and 1.8 branches.

Note: See TracTickets for help on using tickets.