forked from 0x2620/oxjs
fix a bug related to clearing the requests cache
This commit is contained in:
parent
45ad8ee468
commit
7415b72037
3 changed files with 23 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue