| Summary: | [client] Warning in Firefox Error Console when querying charCode of a key event | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Rüdiger Herrmann <ruediger.herrmann> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | tbuschto | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 1.4 M5 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Rüdiger Herrmann
Hi! This is because the EventHandlerUtil#getCharCode works independently from the type of the event. However, the underlying abstraction (EventHandler.js) is not using the value, its just for simplicity that the data is collected before this decision is made. To supress this warning would mean to add or refactor some relatively sensitive code, so i'm leaning towards closing this as a wontfix. That is unless you think keeping the error-console clear of warnings is worth that. I would weight an empty error-console over the risk of introducing a regression. This issue renders the error-console useless as it fills it with hundrets of messages and one will most likely miss other maybe more relevant entries. _If_ you fix this, be aware that there is another occurence of event.charCode in AsyncKeyEventUtil#_getEventInfo. Created attachment 187325 [details]
Proposed patch
+1 for a clean error console. Accepting those warnings is a no-go in my eyes not only because it renders the console useless but also as it leaves the impression of an immature framework! Patch passed javascript tests, commited to CVS HEAD. Is it feasible to have a test case that specifically tests that charCode isn't queried in keyup and keydown events? No, you cant test if a field is read or not. If it were a getter, sure, but not in this case. |