Permalink
Browse files

Fix placeholder focus on ie7/8

  • Loading branch information...
Nihco2
Nihco2 committed Apr 10, 2014
1 parent 185975c commit 0736795efdabfbff3d0772fcb679166196937e2b
@@ -149,8 +149,7 @@ tetra.controller.register("autocomplete", {
havingSuggestion = !0;
break;
}
- if (!havingSuggestion) return me._container.removeClass("active"), _(me._menu).empty(),
- void 0;
+ if (!havingSuggestion) return me._container.removeClass("active"), void _(me._menu).empty();

This comment has been minimized.

Show comment
Hide comment
@slyg

slyg Apr 10, 2014

Contributor

Wha, wha, why this 👽 void ?

@slyg

slyg Apr 10, 2014

Contributor

Wha, wha, why this 👽 void ?

This comment has been minimized.

Show comment
Hide comment
@redking

redking Apr 10, 2014

I've seen this before as an alternative to using 'undefined', because in JavaScript you can redefine the keyword 'undefined' if you want to

@redking

redking Apr 10, 2014

I've seen this before as an alternative to using 'undefined', because in JavaScript you can redefine the keyword 'undefined' if you want to

This comment has been minimized.

Show comment
Hide comment
@slyg

slyg Apr 10, 2014

Contributor

This line is so so weird I've never seen that before, even the return <expression>, <expression> seems not to be a valid one.

@slyg

slyg Apr 10, 2014

Contributor

This line is so so weird I've never seen that before, even the return <expression>, <expression> seems not to be a valid one.

This comment has been minimized.

Show comment
Hide comment
@redking

redking Apr 10, 2014

It'll just return the last expression, I think. But it's a very bad idea to write a return like that.

@redking

redking Apr 10, 2014

It'll just return the last expression, I think. But it's a very bad idea to write a return like that.

This comment has been minimized.

Show comment
Hide comment
@tregagnon

tregagnon Apr 10, 2014

Contributor

If I am correct, you can separate expressions using a comma. Some people prefer this condensed syntax.

@tregagnon

tregagnon Apr 10, 2014

Contributor

If I am correct, you can separate expressions using a comma. Some people prefer this condensed syntax.

This comment has been minimized.

Show comment
Hide comment
@slyg

slyg Apr 10, 2014

Contributor

Well, it's a built code, the source is different.

@slyg

slyg Apr 10, 2014

Contributor

Well, it's a built code, the source is different.

This comment has been minimized.

Show comment
Hide comment
@tregagnon

tregagnon Apr 10, 2014

Contributor

I guess it's OK for minified code. But I have seen some people arguing that the comma is perfectly fine for daily programming. It's a bit like "you don't need semicolons".

@tregagnon

tregagnon Apr 10, 2014

Contributor

I guess it's OK for minified code. But I have seen some people arguing that the comma is perfectly fine for daily programming. It's a bit like "you don't need semicolons".

This comment has been minimized.

Show comment
Hide comment
@slyg

slyg Apr 10, 2014

Contributor

Right ;) I've read the code without seeing the context, if it's a machine speaking to another machine I'm fine with it.

@slyg

slyg Apr 10, 2014

Contributor

Right ;) I've read the code without seeing the context, if it's a machine speaking to another machine I'm fine with it.

This comment has been minimized.

Show comment
Hide comment
@redking

redking Apr 10, 2014

I guess void 0 is a semi-useful trick to know, in the rare case when you're afraid that undefined might be redefined by someone. It's not an issue in strict mode by the way, as far as I remember

@redking

redking Apr 10, 2014

I guess void 0 is a semi-useful trick to know, in the rare case when you're afraid that undefined might be redefined by someone. It's not an issue in strict mode by the way, as far as I remember

This comment has been minimized.

Show comment
Hide comment
@thaume

thaume Apr 10, 2014

Contributor

team understanding the code > saving 1 line

@thaume

thaume Apr 10, 2014

Contributor

team understanding the code > saving 1 line

var suggestions = {};
suggestions.data = suggestionsPack.data.completion, suggestions.query = me._input.val(),
me._boldifyTerms && (suggestions = me.methods.suggestions.boldify(suggestions)),
View
@@ -46,13 +46,13 @@ tetra.controller.register("api", {
if ("undefined" != typeof params.address) geocoder.geocode({
address: params.address
}, function(results, status) {
- return status !== google.maps.GeocoderStatus.OK ? params.cbk(null) : params.cbk(results[0]);
+ return params.cbk(status !== google.maps.GeocoderStatus.OK ? null : results[0]);
}); else if ("undefined" != typeof params.latLng) {
var latlng = new google.maps.LatLng(params.latLng[0], params.latLng[1]);
geocoder.geocode({
location: latlng
}, function(results, status) {
- return status !== google.maps.GeocoderStatus.OK ? params.cbk(null) : params.cbk(results[1].formatted_address);
+ return params.cbk(status !== google.maps.GeocoderStatus.OK ? null : results[1].formatted_address);
});
}
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 0736795

Please sign in to comment.