Side navigation
#1256 closed bug (fixed)
Opened May 30, 2007 05:10PM UTC
Closed April 21, 2009 07:38PM UTC
Error involving e.which/e.keycode
Reported by: | bgoldman | Owned by: | brandon |
---|---|---|---|
Priority: | minor | Milestone: | 1.1.3 |
Component: | event | Version: | 1.1.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Here's a paste from FireBug:
setting a property that has only a getter
fix(keypress charCode=118, keyCode=0)jquery.js (line 2976)
handle(keypress charCode=118, keyCode=0)jquery.js (line 2923)
handle()jquery.js (line 2812)
[Break on this error] event.which = event.keyCode;
Attachments (0)
Change History (6)
Changed May 31, 2007 01:08PM UTC by comment:1
resolution: | → fixed |
---|---|
status: | new → closed |
Changed May 31, 2007 01:08PM UTC by comment:2
component: | ajax → event |
---|
Changed March 11, 2009 03:51AM UTC by comment:3
resolution: | fixed |
---|---|
status: | closed → reopened |
$(document).ready( function() { $(window).keypress(function (e) { if ( (e.which == null && e.type == "keypress") && event.keyCode != null ) e.which = e.keyCode; if( (e.keyCode == 0xA || e.keyCode == 0xD) && e.ctrlKey) { if (window.getSelection) { var selectedText = window.getSelection(); } else if (document.getSelection) { var selectedText = document.getSelection(); } else if (document.selection) { var selectedText = document.selection.createRange().text; } $.ajax({ type: "POST", url: "errorsc", data: {text:[selectedText], pageurl:[window.location.href]}, success: function(msg) { alert(msg); } }); } }); });
FireBug says: setting a property that has only a getter
Changed March 11, 2009 07:30AM UTC by comment:4
change
data: {text:[selectedText], pageurl:[window.location.href]},
to
data: {text:""+selectedText+"", pageurl:[window.location.href]},
and enjoy
Changed March 12, 2009 12:15AM UTC by comment:5
owner: | → brandon |
---|---|
status: | reopened → new |
Changed April 21, 2009 07:38PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | new → closed |
I'm not able to reproduce this. Feel free to attach a test case that illustrates the bug.
This is fixed in Rev [2009]