This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243994

Summary: Autocomplete / suggested text not working for Jquery event handler
Product: javascript Reporter: jmsharp
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description jmsharp 2014-04-22 12:53:10 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Mac OS X version 10.8.4 running on x86_64
Java; VM; Vendor = 1.7.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.51-b03

Example:
$('#somebutton').click(function( event ){
	event.preventDefault();  //<--- Event handler does not suggest or provide any auto complete for available functions for jQuery 
	event.stopPropagation();  //<--- This worked previously in NetBeans 7.x
});
Comment 1 Vladimir Riha 2014-04-22 14:24:44 UTC
Reproducible, but it behaves the same way in 7.4. 

There are 2 ways right now to get code completion for Event:
 #1 Use JSDoc

$('#somebutton').click(
        /**
         * @param {Event} event
         */
        function(event) {

                });


 #2 Press Ctrl+Space twice, which displays "full" completion list but with items that might not be correct (it offers suggestions regardless the property type)


I think this is more of an enhancement, to recognize jQuery event callbacks (because e.g. each() or ajax() have different arguments/parameters in callbacks)