Typeahead.js: how to inspect .tt-dropdown-menu

Created on 16 May 2014  Â·  5Comments  Â·  Source: twitter/typeahead.js

i had problem with custom styling of drop down, so i tried use inspect + toggle element state in chrome dev tools but of course didn't work, any suggestion to keep drop down for inspect ?

Most helpful comment

on chrome, with devtools, look for tt-dropdown-menu and choose on the contextual menu "break on… > subtree modifications. it will pause on debugger and then you can inspect it

All 5 comments

0.10.1 allows you to inspect but it still disappears, but that's how I've been doing it. One alternative is to put a breakpoint somewhere in your code after the typeahead has been rendered, as that will ensure the typeahead is still visible.

on chrome, with devtools, look for tt-dropdown-menu and choose on the contextual menu "break on… > subtree modifications. it will pause on debugger and then you can inspect it

@carlosceia @prashn64 :beers: !

To keep the dropdown open and inspect it easily, comment the following lines on typeahead.bundle.js:

_onBlurred: function onBlurred() {
// this.isActivated = false;
// this.dropdown.empty();
// this.dropdown.close();
},

When you're done with the styling, uncomment and you're good to go.

http://stackoverflow.com/questions/29789767/keep-twitter-typeahead-suggestion-dropdown-open

Is there a easier way guys ? I cannot get the @bikerpower since my library is hosted on a cdn

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GiovanniMounir picture GiovanniMounir  Â·  5Comments

jmullo picture jmullo  Â·  7Comments

GreatPotato picture GreatPotato  Â·  8Comments

digitalpenguin picture digitalpenguin  Â·  4Comments

adamasantares picture adamasantares  Â·  5Comments