<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: console.table(): Silently hiding some columns + Key's 'name' can trigger"
href="https://bugs.webkit.org/show_bug.cgi?id=168873">168873</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Web Inspector: console.table(): Silently hiding some columns + Key's 'name' can trigger
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Safari 10
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>OS X 10.11
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Web Inspector
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>webkitbugs@rmnet.com
</td>
</tr>
<tr>
<th>CC</th>
<td>inspector-bugzilla-changes@group.apple.com
</td>
</tr></table>
<p>
<div>
<pre># Description:
- Running `console.table()` (in the Console) silently hides some columns.
- I know there's a hard-coded limit ("maxColumnsToRender"), but I can trigger the bug without running into that limit.
- I can't figure out the exact pattern (more below), but there seems to be something about Key names (as strings) being letters vs. numbers.
# Reproduce:
- Run console.table() on an array of objects with more than 10 key/value pairs.
- Run console.table() with the "Restricting the columns displayed" argument set to one of the hidden columns.
- Run my test case (attached) which console.table()'s over 8 demo arrays with real content.
- Open the test case in the Safari Console.
- Each case is annotated.
# Actual:
- Columns are silently *not displayed*. There's no indication that they were suppressed.
- IOW: If your array is 13 columns, only 10 will display, and Safari won't say anything about those 3x columns that were not shown.
- The most reduced cases are 3/3b and 4/5. These are 13 column arrays I built just to try to isolate this. Given the max limit, I understand why columns 11, 12, 13 are not displayed.
- Although it would be nice if that Max could be adjusted, or at the least, be easier to learn about :-)
- The weirdest cases are 1 and 2.
- This is somewhat from my original data where I discovered the bug.
- I started adjusting the keys value and removing items from each object until the bug went away.
- The only difference between `var testArr_8col` and `var testArrBug_8col` is the name of the third key:
- `testArr_8col` 3rd key name = "3"
- `testArrBug_8col`3rd key name = "Guest"
- I've found it has something to do with the key name being a number vs. letter.
- Number = OK
- Letter = Triggers Bug!
- I wouldn't think that would matter, since the key is always a string (wrapped in quote marks). But wuduino?
- It's not a length thing either, since I can make the key "333333333" and it's fine. But if I change it to "a" the bug is triggered.
- The "Restricting the columns displayed" argument <<a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/table#Restricting_the_columns_displayed">https://developer.mozilla.org/en-US/docs/Web/API/Console/table#Restricting_the_columns_displayed</a>> is also affected by this issue.
- Meaning: When this argument is set, the cell contents of an auto-hidden column (aka: The Bug) are shown as "-", and not their actual value.
# Expected:
- It should print all of the columns, within reason.
- If there *is* some hard-coded limit, it would be helpful if there was some indication that additional columns were not displayed because of a Safari limit... Not a bug in the developers code :-)
- There should be some consistency to the column limit. IOW: I am able to trigger this bug with an 8 column table (only 7 displayed) and a 13 column table (only 10 displayed).
- Is there any documentation about WebKit + console.table() ?
- This is all that I've been able to find re: Column number limits:
- <<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Web Inspector: console.table only works for the first 5 properties"
href="show_bug.cgi?id=167175">https://bugs.webkit.org/show_bug.cgi?id=167175</a>>
- <<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=899753#c37">https://bugzilla.mozilla.org/show_bug.cgi?id=899753#c37</a>>
# Notes:
- Safari Version 10.0.3 (11602.4.8.0.1), OS 10.11.6.
- Sorry I don't have 10.12.x to test.
- Apologies if this has already been fixed.
- Chrome doesn't exhibit any of this. I've tested up to 20 columns there.
- Here's the closest related reports I was able to find, but they mostly deal with the max limit and not the "key name as letter vs. number" issue:
- <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Web Inspector: console.table isn't taking more than 5 named columns per row."
href="show_bug.cgi?id=114810">Bug 114810</a> <<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Web Inspector: console.table isn't taking more than 5 named columns per row."
href="show_bug.cgi?id=114810">https://bugs.webkit.org/show_bug.cgi?id=114810</a>>
- <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Web Inspector: console.table only works for the first 5 properties"
href="show_bug.cgi?id=167175">Bug 167175</a> <<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Web Inspector: console.table only works for the first 5 properties"
href="show_bug.cgi?id=167175">https://bugs.webkit.org/show_bug.cgi?id=167175</a>>
- Re: "maxColumnsToRender = 15":
- I found this too: <a href="https://github.com/WebKit/webkit/commit/859894843dc06e40dc998e4fccdcf30c01163089#diff-0fee7706d13c90c6985b4ebddde0c20e">https://github.com/WebKit/webkit/commit/859894843dc06e40dc998e4fccdcf30c01163089#diff-0fee7706d13c90c6985b4ebddde0c20e</a>
- There's something here about the "front end" limiting to "5" while the backend processes "10". Maybe this has something to do with 1/2 of the issues I'm seeing?
Thanks!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>