Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11300 closed defect (fixed)

blockModeForEnter Not Working Across Browsers (maybe just BR?)

Reported by: David Walsh Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.6
Component: Editor Version: 1.5.0b2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Unfortunately it looks as though blockModeForEnter has been broken for quite some time. Using the following tests:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/editor/test_Editor.html

When you add test to the BR editor you get mixed results across browsers:

FireFox
====================================
"This is a test.<br /><br />Whoa!<br /><br />Que?<br />"



Safari
====================================
This is some more text.<div><br /></div><div>More text...</div><div><br /></div><div>And even more text...</div><div><br /></div><div><br /></div>


Internet Explorer
====================================
"<p>dsjfjklsadfjkjksadlf</p><p>asdfkjkjlasfk</p><p>adsflkjjkasdfklj</p>"

I do not have a patch at this time.

Attachments (2)

EnterKeyHandling.patch (13.3 KB) - added by Jared Jurkiewicz 9 years ago.
Patch take 3. Updates for *all* browsers and generates consistent behavior for enter key.
EnterKeyHandling.2.patch (23.6 KB) - added by Jared Jurkiewicz 9 years ago.
Patch take 4. Updated unit tests and minor fix for Firefox. Also updated doc.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 9 years ago by Douglas Hays

Owner: set to Jared Jurkiewicz

comment:2 Changed 9 years ago by Jared Jurkiewicz

The BR editor isn't using blockNodeForEnter = BR. That's testing something completely different, it is verifying that editor doesn't try to insert child tags to a br element.

comment:3 Changed 9 years ago by Jared Jurkiewicz

Milestone: tbdfuture

comment:4 Changed 9 years ago by Jared Jurkiewicz

BlockMoreForEnter? BR is definitely wonky across browsers. Part of the problem is it relies on a command that ONLY works on Firefox. Ugh.

Looking into solutions.

comment:5 Changed 9 years ago by Jared Jurkiewicz

Did more work on this today. It's plain nasty to try and commonize it across browsers for br mode. I'm close, I guess. Will take a few more 'days' of dev time probably.

Changed 9 years ago by Jared Jurkiewicz

Attachment: EnterKeyHandling.patch added

Patch take 3. Updates for *all* browsers and generates consistent behavior for enter key.

Changed 9 years ago by Jared Jurkiewicz

Attachment: EnterKeyHandling.2.patch added

Patch take 4. Updated unit tests and minor fix for Firefox. Also updated doc.

comment:6 Changed 9 years ago by Jared Jurkiewicz

(In [22795]) Updated EnterKeyHandling? plugin. Fixed BR mode to be common across browsers, updated UT, updated doc. \!strict refs #11300

comment:7 Changed 9 years ago by Jared Jurkiewicz

(In [22796]) Updated EnterKeyHandling? plugin. Tweaks to BR mode, UT (Mainly for webkit). \!strict refs #11300

comment:8 Changed 9 years ago by Jared Jurkiewicz

(In [22797]) Updated EnterKeyHandling? plugin. Tweaks to BR mode, UT (Mainly for webkit). \!strict refs #11300

comment:9 Changed 9 years ago by Jared Jurkiewicz

Milestone: future1.6
Resolution: fixed
Status: newclosed

comment:10 Changed 9 years ago by bill

Resolution: fixed
Status: closedreopened

Good job on this, but Editor_mouse.html and Editor_a11y.html are now failing (FF3.6/win).

comment:11 Changed 9 years ago by Jared Jurkiewicz

They didn't fail for me. Anyway, I'll recheck them when I get time this friday.

comment:12 Changed 9 years ago by Jared Jurkiewicz

(In [22804]) Minor tweak to mouse test, since the by format changed (got rid of space). refs #11300

comment:13 Changed 9 years ago by Jared Jurkiewicz

(In [22805]) Minor tweak to mouse test, since the by format changed (got rid of space). refs #11300

comment:14 Changed 9 years ago by Jared Jurkiewicz

Simple failures. I cleaned up (reduced) the space in some generated html. The test was looking for it.

comment:15 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: reopenedclosed

comment:16 Changed 9 years ago by bill

(In [22809]) Some minor doc fixes, refs #11300 !strict.

comment:17 Changed 9 years ago by bill

Resolution: fixed
Status: closedreopened

Looks like [22804] and [22805] fixed FF3.6/mac but broke FF3.6/win, so I guess we need something less fragile for the test, maybe run the actual result through .replace(/ \/>/g, "/>").

comment:18 Changed 9 years ago by Jared Jurkiewicz

Probably. I'll look at it and see if I can reproduce the errors on my Windows machine (I don't remember seeing it fail there when I tweaked it.).

-- Jared

comment:19 Changed 9 years ago by Jared Jurkiewicz

It passes for me fine. I'll still add the suggestion, but I can't reproduce any failures on windows or Mac.

comment:20 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: reopenedclosed

Actually, tests have been redone, passing fine, so just closing,

comment:21 Changed 9 years ago by bill

Description: modified (diff)

Fixed in [23091] and [23092].

Note: See TracTickets for help on using tickets.