1
0
Fork 0
forked from 0x2620/oxjs

fix a bug related to clearing the requests cache

This commit is contained in:
rlx 2011-10-29 12:32:55 +00:00
commit 7415b72037
3 changed files with 23 additions and 13 deletions

View file

@ -119,8 +119,9 @@ Ox.Request = function(options) {
options.age == -1
|| options.age > +new Date() - cache[req].time
)) {
var data = cache[req].data;
setTimeout(function() {
callback && callback(cache[req].data);
callback && callback(data);
}, 0);
} else {
pending[options.id] = true;

View file

@ -695,7 +695,6 @@ Ox.Input = function(options, self) {
newValue = oldValue.substr(0, oldCursor[0] - 1),
hasDeletedSelectedEnd = (event.keyCode == 8 || event.keyCode == 46) &&
oldCursor[0] < oldCursor[1] && oldCursor[1] == oldValue.length;
Ox.print('CHANGE ON KEYPRESS', self.options.changeOnKeypress);
if (
event.keyCode != 9 // tab
&& (self.options.type == 'textarea' || event.keyCode != 13) // enter