formatic
Advanced tools
Comparing version 0.3.71 to 0.3.72
@@ -133,3 +133,7 @@ 'use strict'; | ||
onFocusWrapper: function onFocusWrapper() { | ||
onFocusClick: function onFocusClick() { | ||
this.onFocusWrapper(true); | ||
}, | ||
onFocusWrapper: function onFocusWrapper(isFromClick) { | ||
var _this2 = this; | ||
@@ -141,8 +145,11 @@ | ||
}, function () { | ||
setTimeout(function () { | ||
if (_this2.codeMirror && !_this2.codeMirror.state.focused) { | ||
_this2.codeMirror.focus(); | ||
_this2.codeMirror.setCursor(_this2.codeMirror.lineCount(), 0); | ||
} | ||
}, 0); | ||
// If this is from a click, we lose focus, so force it focused! | ||
if (isFromClick) { | ||
setTimeout(function () { | ||
if (_this2.codeMirror && !_this2.codeMirror.state.focused) { | ||
_this2.codeMirror.focus(); | ||
_this2.codeMirror.setCursor(_this2.codeMirror.lineCount(), 0); | ||
} | ||
}, 0); | ||
} | ||
}); | ||
@@ -287,6 +294,6 @@ }, | ||
'div', | ||
{ onClick: this.onFocusWrapper }, | ||
{ onClick: this.onFocusClick }, | ||
React.createElement( | ||
'div', | ||
{ className: textBoxClasses, tabIndex: this.wrapperTabIndex(), onFocus: this.onFocusWrapper, onBlur: this.onBlur }, | ||
{ className: textBoxClasses, tabIndex: this.wrapperTabIndex(), onFocus: this.onFocusWrap, onBlur: this.onBlur }, | ||
React.createElement('div', { ref: 'textBox', className: 'internal-text-wrapper' }) | ||
@@ -293,0 +300,0 @@ ) |
{ | ||
"name": "formatic", | ||
"version": "0.3.71", | ||
"version": "0.3.72", | ||
"description": "Automatic, pluggable form generation", | ||
@@ -5,0 +5,0 @@ "main": "./build/lib/formatic", |
209498
5911