Closed Bug 1231419 Opened 9 years ago Closed 8 years ago

In Web Console, "1 more..." appears for jQuery selections with only 1 result

Categories

(DevTools :: Console, defect)

45 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1301999

People

(Reporter: rick3162, Unassigned)

References

Details

Attachments

(1 file)

Attached image screenshot.jpg
I just noticed it.
To reproduce (fresh profile Nightly 45.0a1 x64 (2015-12-09) in win10 x64):
- open https://www.instagram.com/instagram/
- open Developer Toolbar(shift+F2) and type 'inject jQuery' (you'll get 'jQuery loaded')
- open Web Console (ctrl+shift+K) and type: 
  $("a:contains('Load more')")
You'll get
> 'Object { length: 1, prevObject: Object, context: HTMLDocument → instagram, selector: "a:contains('Load more')", 1 more… }'
Clicking '1 more...' shows: https://i.imgur.com/yrrSZsQ.jpg (i.e. see attachment)

There shouldn't be '1 more...' when there's only 1 result.


PS. In Firefox 42 the issue doesn't occur.
https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=ca30d9070e53f75b90b9710d2533bb5bf0a74240&tochange=74d91f50bad6807a8bfc7d9f89ee724e2502ec35

Tom Tromey — Bug 1035545 - show wrapped primitives specially in console and variable view; r=vporof,fitzgen

Tom, your opinion?
Flags: needinfo?(ttromey)
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → 45 Branch
Blocks: 1035545
Of course there's 1 more - there's a "length" property.
I tried this.  I see "1 more...".
Clicking on that, the variable view opens.
The variable view shows that the object in question has a property "0".

So, my inclination is to say there isn't a bug here.

Do you see the 0 property as well?
Flags: needinfo?(rick3162)
Clear my NI.
Flags: needinfo?(ttromey)
Yes, as it's in the screenshot.
So, based on your comment, the '1 more..' means that (apart from the 4 properties currently shown in the line: length, prevObject, context, selector) 
there is 1 more property in variable view, the property 0. 
Maybe that's because this 5th property doesn't fit to the line?


But, here is another use case -not with jQuery- (found in bug 1035545):
> var x = new String('abc');
> x;
This gives: 
> String { "abc", 4 more… }
i.e. https://i.imgur.com/L0Hl4U9.jpg
In this case, if I'm correct, the 4 properties aren't supposed to be displayed in the line, i.e not showing something like:
> String { "abc", 0: "a", 1: "b", 2: "c", length: 3 }
but only inside the variable view, via clicking the "4 more".


So, shouldn't in this case, instead of "4 more.." to show "4 properties"?
In other words, the wording "more" to appear only when some properties don't fit to the current line?
Or, in which cases is the wording "more" supposed to be displayed?
Flags: needinfo?(rick3162)
(In reply to Kostas from comment #5)

Sorry, forgot about this for a bit.
Feel free to NI me.

> Maybe that's because this 5th property doesn't fit to the line?

TBH I don't know what heuristic is used here.

> So, shouldn't in this case, instead of "4 more.." to show "4 properties"?
> In other words, the wording "more" to appear only when some properties don't
> fit to the current line?
> Or, in which cases is the wording "more" supposed to be displayed?

I see what you mean.  It is perhaps a bit confusing to say "4 more" when there
aren't any obvious properties to begin with.

I tend to think that the current approach is ok, on the basis that it isn't
really more than mildly confusing; and that it's better to be a bit terse here.
But I will ask someone more versed in the console than I to look at it.
I agree with Tom, I think the current approach is the best way to go on this.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
This seems the same problem I fixed in bug 1301999.
Resolution: WONTFIX → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: