Opened 8 years ago

Last modified 8 years ago

#1513 new defect

Xinha inserts <br /> after empty <div>

Reported by: guest Owned by:
Priority: normal Milestone: 0.97
Component: HTML Output Version: trunk
Severity: normal Keywords: html br empty div
Cc: stuart.gilbert@…

Description

When editing a page in Xinha I find that a " <br />" gets inserted after an empty <div>

I have created a test page on my domain at http://stu.ie/xinhatest/xinhatest.html

If you enter source mode and go to the line with the #slideshow <div> you will see " <br />" after the closing div tag. If you delete that <br /> and then go back to WYSIWYG, then back to source, you will see that the <br /> has been re-created.

This happens if I remove the space between the </div> and the </td>, AND if I use a self-closing <div />.

I can prevent this from happening by putting some content (&nbsp;) in the #slideshow <div> but that's not really a great solution...

I'm struggling to find the cause of this weirdness, and haven't noticed it before now. I have searched tickets and Google for this issue but cannot find mention of it.

I can reached by email at stuart.gilbert @ gmail.com if any more information is required, or if there's a known fix for this issue.

Regards,
Stuart.

Change History (4)

comment:1 Changed 8 years ago by gogo

Have you tried in other browsers?

Could be...

a) A browser specific behaviour not done by Xinha
b) Possibly it is inserted at some point by Xinha/Plugin? to work around a common problem where it is not possible to focus (place the caret) after such an element (particularly if it is the last element in the HTML).

comment:2 Changed 8 years ago by gogo

  • Cc stuart.gilbert@… added

comment:3 Changed 8 years ago by guest

I have now tested this in Internet Explorer 8 and Google Chrome on a Windows virtual machine and the <br /> is not being inserted in either of these browsers when I perform the actions listed above.

So I guess that narrows down the behaviour somewhat.

It seems that there should probably be some fix/handler for Firefox so that it doesn't insert random code.

comment:4 Changed 8 years ago by gogo

  • Milestone changed from 0.96 to 0.97
Note: See TracTickets for help on using tickets.