Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere is this vertical padding in jqGrid coming from?
    text
    copied!<p>I've noticed a strange bug when using jqGrid with inline editing in chrome. As rows are selected, the vertical padding grows by a pixel or two each time. I'm not sure what's causing this, but I've managed to condense it down to a simplified example:</p> <p><a href="http://jsfiddle.net/3mrKD/" rel="nofollow noreferrer">http://jsfiddle.net/3mrKD/</a></p> <p><strong>UPDATE</strong>: simpler version without jqGrid: <a href="http://jsfiddle.net/3mrKD/9/" rel="nofollow noreferrer">http://jsfiddle.net/3mrKD/9/</a></p> <p>If you click back and forth between the two rows, you can make each row's height grow indefinitely. Chrome's inspector shows the extra space as padding, but the size doesn't match the metrics inspector value.</p> <p>I can reproduce this reliably on the latest version of Chrome (26.0.1410.64 m) for both Windows and Mac, but not on any version of Firefox, IE 9 or 10, or Safari.</p> <p>Does this look like a bug in one of the libraries I'm using? in Chrome?</p> <p><img src="https://i.stack.imgur.com/0stJg.png" alt="table cell with extra vertical padding"></p> <p>HTML:</p> <pre><code>&lt;table id="grid"&gt;&lt;/table&gt; </code></pre> <p>CSS:</p> <pre><code>td { vertical-align: baseline; } </code></pre> <p>JavaScript:</p> <pre><code>var lastSelected; $("#grid").jqGrid({ datatype: "local", data: [{ id: 1, name: "Alice" }, { id: 2, name: "Bob" }], colModel: [ { name: 'id' }, { name: 'name', editable: true } ], onSelectRow: function(id) { if (id &amp;&amp; id !== lastSelected) { $("#grid").jqGrid('restoreRow', lastSelected); $("#grid").jqGrid('editRow', id, true); lastSelected = id; } }, }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload