Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#11898 closed defect (fixed)

dijit.Editor Firefox: cursor is displayed on the far right instead of the left

Reported by: philip Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.6
Component: Editor Version: 1.5
Keywords: dijit.Editor Firefox cursor Cc:
Blocked By: Blocking:

Description

Run the attached example. The example has two editors; one of them works as expected in Firefox and one of them does not. I found that if the editor starts with: '<p></p>', when you click in the editor, the cursor is displayed in the wrong location (it is displayed in the far right of the div rather than the left). Further, this only happens if the hide and then display the editor div before clicking in the editor window.

<html dir="ltr">
<head>

  <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/tundra/tundra.css"/>

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" djConfig="parseOnLoad: true">
  </script>

  <script type="text/javascript">
    dojo.require("dijit.Editor");
  </script>


<body style="width:600px" class="tundra">

<script>
  // Toggle a div
  function toggle(elem) {
    var e = document.getElementById(elem);
    if (e.style.display == 'none')
      e.style.display='';
    else
      e.style.display='none';
  }
</script>

<p>
This version works on Firefox. Click the Toggle State button twice and click in the editor window. The cursor is displayed as expected.
<br/>
<button onclick="toggle('editor1');">Toggle State</button>
<br/>
<div style="width:400px;height:300px" dojoType="dijit.Editor" id="editor1"></div>
</p>

<br/><br/>

<p>
This version does not work. When you click the Toggle State button twice and click in the editor window, the cursor is displayed on the far right of the div. Once the div contains any text, it works correctly.
<br/>
<button onclick="toggle('editor2');">Toggle State</button>
<br/>
<div style="width:400px;height:300px" dojoType="dijit.Editor" id="editor2"><p></p></div>

</body>
</html>


Change History (8)

comment:1 Changed 9 years ago by bill

Component: GeneralEditor
Owner: anonymous deleted

comment:2 Changed 9 years ago by Jared Jurkiewicz

Milestone: tbd1.6
Owner: set to Jared Jurkiewicz

comment:3 Changed 9 years ago by Jared Jurkiewicz

This is definitely a firefox bug. Will put in a simple workaround.

comment:4 Changed 9 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

fixed in: [23159]

comment:5 Changed 6 years ago by Bill Keese <bill@…>

In 0854ec27436ba935b09e29c0cfc2960656780070/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 6 years ago by Colin Snover <github.com@…>

In f7e337959c313ccfdeae8e26c629a48e60fa9ed0/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 6 years ago by mahays0 <mahays0@…>

In a443c8477ce0111edffe0977dbe5794380af1001/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 5 years ago by Bill Keese <bill@…>

In 85084afe0860604414984acf95fb5edcb84cad19/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.