<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Event bubbling: keydown in grid w/ cellEdit: true</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>daniel.soneira on Event bubbling: keydown in grid w/ cellEdit: true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true#p22895</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true#p22895</guid>
        	        	<description><![CDATA[<p>The problem still exists in version 4.0 - new line numbers in grid.celledit.js are 99 and 393.</p>
<p>I was hoping that the new method bindKeys would help solving the issue but the cell-edit code seems to be pretty much unchanged.</p>
</p>
<p>Cheers,</p>
<p>Daniel</p>
]]></description>
        	        	<pubDate>Thu, 21 Apr 2011 16:21:27 +0300</pubDate>
        </item>
        <item>
        	<title>daniel.soneira on Event bubbling: keydown in grid w/ cellEdit: true</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true#p16755</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/event-bubbling-keydown-in-grid-w-celledit-true#p16755</guid>
        	        	<description><![CDATA[<p>Hello jqGrid developers,</p>
</p>
<p>My environment:</p>
<ul>
<li>Firefox 3.6.3</li>
</ul>
<ul>
<li>jQuery 1.4.2</li>
</ul>
<ul>
<li>jqGrid 3.6.4</li>
</ul>
<p>I want to handle a keyboard-shortcut (CTRL+N) to add a new row to a grid.</p>
<p>To do that I&#39;ve setup an event delegation similar to the following:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3881' value='Select Code' data-codeid='sfcode3881' /></p>
<div class='sfcode' id='sfcode3881'>jQuery(document).ready(function(){<br />&#160; jQuery(document).delegate(&#39;.ui-jqgrid&#39;,&#39;keydown&#39;, function(event){<br />&#160;        if (event.ctrlKey  &#38;&#38; event.which == 78) {<br />&#160;&#160;&#160; // prevent opening a new window<br />&#160;&#160;&#160; event.stopImmediatePropagation();<br />&#160;&#160;&#160; event.preventDefault();<br />&#160;&#160;&#160; grid_add_row(); // code itself works fine<br />&#160;&#160;&#160; return  false;<br />&#160; }<br /> });<br />});</div>
</p>
<p>There are two places in <strong>grid.celledit.js</strong> that prevent this from working correctly:</p>
</p>
<p>The first deals with keyboard input when in celledit-mode:</p>
<p><strong>line 99</strong> &#8211; e.stopPropagation();</p>
</p>
<p>The second comes into play when navigating the grid with the keyboard:</p>
<p><strong>line 392</strong> in function GridNav() &#8211; return false;</p>
</p>
<p>Both cancel the event bubbling so that my handler is not invoked correctly. This is done regardless of which key was pressed.</p>
<p>I guess stopping the event to bubble is OK for some specific keys that are handled in these two methods (like ESC, ENTER, TAB) but is there a reason that you generally don&#39;t allow the event propagation in case of other keys?</p>
</p>
<p>If my description of the problem is somewhat not clear I would gladly provide a test case to demonstrate it.</p>
</p>
<p>Kind regards,</p>
<p>Daniel</p>
</p>
<p>PS: Thanks for putting so much effort into making this great grid plugin.</p>
]]></description>
        	        	<pubDate>Tue, 27 Apr 2010 15:22:06 +0300</pubDate>
        </item>
</channel>
</rss>