Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#16024 closed defect (fixed)

Editor's AlwaysShowToolbar plugin on of cuts off bottom text on resize

Reported by: Matt Lauer Owned by: haysmark
Priority: undecided Milestone: 1.9
Component: Editor Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


When using a dijit.Editor with the dijit._editor.plugins.AlwaysShowToolbar? plugin and the Toolbar becomes fixed to the top of the viewport and the Editor resizes (most commonly from just hitting enter) it cuts off the last line text/markup in the editor due to the height of the Toolbar being applied to the Editor's iframe as margin-top. I use v1.6.1 of the toolkit and it has the same problem as the nightly tests.


  1. Go to the "Created from div, auto-expanding" test
  2. Scroll down enough so the Toolbar is fixed to top of your viewport and you can still see some of the Editor
  3. Put your cursor after "Sed vitae risus." and hit Enter
  4. Watch the next line " The following HTML should appear as source: <INPUT TYPE="IMAGE" SRC="javascript:alert('no scripting attacks')"> " disappear.
  5. You can scroll up (so the Toolbar returns to normal spot) and delete that new paragraph and watch the line appear again.

The iframe (in dijitEditorIFrameContainer) gets a margin-top applied everytime the Toolbar fixes to the top of the viewport. The Iframe has the right calculated height, but the margin/toolbar height somehow compounds to hide the last N pixels of the Editor. If you remove the iframe's margin-top setting manually and hit enter again (to trigger the resize) the bottom line will reappear.

This issue seems to affect all browsers (IE, Chrome, FF on Win 7 that I tried).

Somewhat related issue with AlwaysShowToolbar? plugin: when the cursor is on the last line of the Editor in Firefox and the user hits the down arrow key the cursor jumps all the way to the top of the Editor. This is usually out of sight on long pages and a undesired behavior. This only happens in Firefox.

Change History (4)

comment:1 Changed 10 years ago by Matt Lauer

Is anyone going to be assigned this bug? It's a somewhat significant yet minor issue.

comment:2 Changed 9 years ago by haysmark

Owner: set to haysmark
Status: newassigned

comment:3 Changed 9 years ago by haysmark

Resolution: fixed
Status: assignedclosed

In [30574]:

Update height calculation to reflect change to iframe marginTop when toolbar becomes fixed to top of screen. Fixes #16024.

comment:4 Changed 9 years ago by haysmark

Milestone: tbd1.9
Note: See TracTickets for help on using tickets.