Skip to content

Commit 13257f4

Browse files
committed
Fixes #156. Bug in selectize.js
1 parent bf140bb commit 13257f4

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

stylebot/background/browseraction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var BrowserAction = {
1515
port.onDisconnect.addListener(function() {
1616
if (activeTab) {
1717
chrome.tabs.sendRequest(activeTab.id, {
18-
name: "resetPreview"
18+
name: 'resetPreview'
1919
}, function(response){});
2020
}
2121
});

stylebot/editor/style.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,11 @@ stylebot.style = {
616616
* @param {String} css The CSS to apply to the page.
617617
*/
618618
resetPreview: function() {
619-
CSSUtils.crunchCSS(this.rules, true, true, _.bind(function(css) {
620-
this.cache.$style.html(css);
621-
}, this));
619+
if (this.rules && this.cache.$style) {
620+
CSSUtils.crunchCSS(this.rules, true, true, _.bind(function(css) {
621+
this.cache.$style.html(css);
622+
}, this));
623+
};
622624

623625
this.hidePreviewPopover();
624626
},

stylebot/editor/widget-ui.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ var WidgetUI = {
5050
SIZE_UNITS: ['px', 'em', '%', 'pt'],
5151
DEFAULT_SIZE_UNIT: 'px',
5252

53-
DEFAULT_FONT_STACK: ['Helvetica',
53+
DEFAULT_FONT_STACK: [
54+
'Helvetica',
5455
'Roboto',
5556
'Lato',
5657
'Palatino',

stylebot/editor/widget.basic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ stylebot.widget.basic = {
8484
}]
8585
},
8686
{
87-
name: '<u>C</u>olor & Background',
87+
name: '<u>C</u>olor &amp; Background',
8888
controls: [{
8989
name: 'Color',
9090
id: 'color',
@@ -134,7 +134,7 @@ stylebot.widget.basic = {
134134
}]
135135
},
136136
{
137-
name: '<u>L</u>ayout & Visibility',
137+
name: '<u>L</u>ayout &amp; Visibility',
138138
controls: [{
139139
name: 'Visibility',
140140
id: 'display',

stylebot/libs/colorpicker/colorpicker.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stylebot/libs/selectize/selectize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454

455455
$wrapper = $('<div>').addClass(this.settings.theme).addClass(this.settings.wrapperClass);
456456
$control = $('<div>').addClass(this.settings.inputClass).addClass('items').toggleClass('has-options', !$.isEmptyObject(this.options)).appendTo($wrapper);
457-
$control_input = $('<input type="text">').appendTo($control);
457+
$control_input = $('<input type="text" />').appendTo($control);
458458
$dropdown = $('<div>').addClass(this.settings.dropdownClass).hide().appendTo($wrapper);
459459

460460
displayMode = this.$input.css('display');

0 commit comments

Comments
 (0)