:: Forum >>

Backspace not working

I cannot use the Backspace key when editing in a grid. Is this key a setting in AW? Is this an error in my code?
AS
Monday, November 27, 2006
I don't see this problem in the standard examples, could be the problem with your code?
Alex (ActiveWidgets)
Tuesday, November 28, 2006
Do you know where in the code it may have been disabled? I did nothing with keypresses or anything that should effect the way a key works.
AS
Tuesday, November 28, 2006
No... Editing procedure does not capture and does not process backspace key. There is some code in system/control.js, line 562 which raises onKeyBackspace event but it should not affect the editing. Do you have the same behavior in IE and FF?
Alex (ActiveWidgets)
Tuesday, November 28, 2006
I do not use FF so I could not say. I tried commenting out most of my .js and still could not find out why I cannot use backspace.
AS
Tuesday, November 28, 2006
Alex,
We found the issue with our code, we have a common script which is making sure we only do a backspace on text and textarea, what else can we add to this to allow for ActiveWidgets to be accepted.

if (event.keyCode == 8)
{
if (!("text" == event.srcElement.type)
&& !("textarea" == event.srcElement.type))
{
event.cancelBubble = true;
event.returnValue = false;
}
}
Is there a srcElement.type we can test for, for active widgets
AS
Tuesday, November 28, 2006
Can anyone answer this?
AS
Thursday, November 30, 2006
The edit box is a span with contentEditable attribute set to true. You may check for srcElement.contentEditable == true.
Alex (ActiveWidgets)
Thursday, November 30, 2006
To clarify - the above refers to the editing of the grid cell in IE. In all other cases it is the standard <input type="text"> element.
Alex (ActiveWidgets)
Thursday, November 30, 2006

This topic is archived.


Back to support forum

Forum search