3.2.0

Overtype multiple spaces in grid doesn't work properly

The client of my system that uses ActiveWidgets 2.0 just ran into an annoying problem involving overtyping of data in grid cells using spaces. I was able to duplicate this problem using the sample grid at http://www.activewidgets.com/grid/, so I know it's not caused by anything in my code. The problem shows up as follows:

You first click in any table cell to start editing the cell. Usually, keyboard input will be in insert mode and any characters you type are inserted at the current cursor position. If you hit the Insert key, however, the keyboard input will now go into overtype mode. If you type any keys other than a space, it works properly, overwriting the characters at the current cursor position. If you type more than one space in sequence (more than two if you are at the start of the cell), the first character is replaced by a space, but then successive space characters are *inserted* into the cell data, even those overtype mode is still set.

Since the client uses formatted data that often involves multiple spaces, and they used overtype mode extensively in the old system that was replaced by the ActiveWidgets-based system, they are screaming at me to fix this yesterday. Does anyone know of a workaround to this problem? Alex, is this something that can get fixed in the next release?
Randall Severy
November 16,
The problem is with ActiveWidgets using <span contentEditable="true"/> when a cell receives editable focus in IE. The following snippet simulates what activewidgets does and it displays the same behavior as activewidgets. Basically, the bug is in the IE span component, not activewidgets.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body onload="document.getElementById('one').focus()">
<span id="one" style="border:1px solid black;width:150px;" contentEditable="true" tabindex="0" hidefocus="true">overtype me once</span>
<span id="two" style="border:1px solid black;width:150px;" contentEditable="true" tabindex="0" hidefocus="true">overtype me twice</span>
</body>
</html>

Having said that, the fact that ActiveWidgets uses contentEditable="true" is probably the biggest problem I've had with the component (try entering "a@b " or "http://yyy " into a cell). However, I believe all is not lost. ActiveWidgets 2.5 (currently in BETA) supposedly replaces the span with <input type="text"> when the cell receives focus. I was going to suggest using firefox (contentEditable="true" is not supported so I think it uses <input type="text">), but I just tested it there and does not seem to support overtype at all. It was a quick test of FF so I may have made a mistake.
Bryn
November 17,
I just tested 2.5 and the problem no longer occurs in IE.

Overtype in FF does not appear to be supported either inside or outside of the grid so I dont think its an ActiveWidgets problem.
Bryn
November 17,
Yes, I want to confirm what Bryn said above - AW 2.5 does not use contentEditable=true anymore. It inserts <input type=text> tag in IE and all other browsers. So AW 2.5 does not have this 'overtype spaces' bug.
Alex (ActiveWidgets)
November 20,

This topic is archived.

See also:


Back to support forum