Commit 104ef9d3 authored by darin's avatar darin
Browse files

Reviewed by Ken.

	- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly

	The handler was getting ignored because the property setting code never got to the DOMNode level.

        * khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
	of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
	including onkeypress.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 358180db
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly
The handler was getting ignored because the property setting code never got to the DOMNode level.
* khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
including onkeypress.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Trey and Ken.
......
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly
The handler was getting ignored because the property setting code never got to the DOMNode level.
* khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
including onkeypress.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Trey and Ken.
......
......@@ -746,8 +746,7 @@ void DOMDocument::tryPut(ExecState *exec, const Identifier& propertyName, const
#ifdef KJS_VERBOSE
kdDebug(6070) << "DOMDocument::tryPut " << propertyName.qstring() << endl;
#endif
DOMObjectLookupPut<DOMDocument,DOMObject>(exec, propertyName, value, attr,
&DOMDocumentTable, this );
DOMObjectLookupPut<DOMDocument,DOMNode>(exec, propertyName, value, attr, &DOMDocumentTable, this );
}
void DOMDocument::putValue(ExecState *exec, int token, const Value& value, int /*attr*/)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment