:: Forum >>
Editable cells in IE and contentEditable attribute
We have a grid with cells that are editable. If the user enters an email or web address IE in its infinite wisdom wraps the address with a link html tag. For instance x@x is converted to <A HREF="x@x">x@x</A>. Is there any way we can suppress this behavior?
We have a partial solution whereby we strip out the additional HTML elements when the cell loses focus. However, its not ideal because while the cells are being edited the email and web addresses appear as links. We did try stripping the extra HTML elements as the user enters the data but found that this caused caret position issues if the user is entering data into the middle of cell.
Any ideas?
Thanks.
Bryn
Wednesday, September 12, 2007
Yes, this is a known bug. The new AW 2.5 will use normal textbox instead of contentEditable so it will be fixed in AW 2.5.
You can try using cell text validation to prevent this - replace the links back as you type -
obj.onCellTextChanging = function(text, col, row){
if (text.match("<A")) {
this.setCellText(text.replace(/<.+?>/g, ""), col, row);
return true;
}
}
See also -
http://www.activewidgets.com/javascript.forum.17649.7/disable-automatic-linking-in-grids.html
Alex (ActiveWidgets)
Thursday, September 13, 2007
Thanks for your input.
Any ideas when AW 2.5 will be GA? I see it's alpha1 now.
Bryn
Thursday, September 13, 2007
October-November this year.
Alex (ActiveWidgets)
Thursday, September 13, 2007
This topic is archived.
Back to support forum
Forum search