| 525 | | var _this = this; |
| 526 | | var dataObject = this.store.fetch({ |
| 527 | | queryOptions: { |
| 528 | | ignoreCase: this.ignoreCase, |
| 529 | | deep: true |
| 530 | | }, |
| 531 | | query: query, |
| 532 | | onComplete: dojo.hitch(this, "_openResultList"), |
| 533 | | onError: function(errText){ |
| 534 | | console.error('dijit.form.ComboBox: ' + errText); |
| 535 | | dojo.hitch(_this, "_hideResultList")(); |
| 536 | | }, |
| 537 | | start:0, |
| 538 | | count:this.pageSize |
| 539 | | }); |
| 540 | | |
| 541 | | var nextSearch = function(dataObject, direction){ |
| 542 | | dataObject.start += dataObject.count*direction; |
| 543 | | // #4091: |
| 544 | | // tell callback the direction of the paging so the screen |
| 545 | | // reader knows which menu option to shout |
| 546 | | dataObject.direction = direction; |
| 547 | | this.store.fetch(dataObject); |
| 548 | | } |
| 549 | | this._nextSearch = this._popupWidget.onPage = dojo.hitch(this, nextSearch, dataObject); |
| | 525 | // #5970: set _lastQuery, *then* start the timeout |
| | 526 | // otherwise, if the user types and the last query returns before the timeout, |
| | 527 | // _lastQuery won't be set and their input gets rewritten |
| | 528 | this.searchTimer=setTimeout(dojo.hitch(this, function(query, _this){ |
| | 529 | var dataObject = this.store.fetch({ |
| | 530 | queryOptions: { |
| | 531 | ignoreCase: this.ignoreCase, |
| | 532 | deep: true |
| | 533 | }, |
| | 534 | query: query, |
| | 535 | onComplete: dojo.hitch(this, "_openResultList"), |
| | 536 | onError: function(errText){ |
| | 537 | console.error('dijit.form.ComboBox: ' + errText); |
| | 538 | dojo.hitch(_this, "_hideResultList")(); |
| | 539 | }, |
| | 540 | start:0, |
| | 541 | count:this.pageSize |
| | 542 | }); |
| | 543 | |
| | 544 | var nextSearch = function(dataObject, direction){ |
| | 545 | dataObject.start += dataObject.count*direction; |
| | 546 | // #4091: |
| | 547 | // tell callback the direction of the paging so the screen |
| | 548 | // reader knows which menu option to shout |
| | 549 | dataObject.direction = direction; |
| | 550 | this.store.fetch(dataObject); |
| | 551 | } |
| | 552 | this._nextSearch = this._popupWidget.onPage = dojo.hitch(this, nextSearch, dataObject); |
| | 553 | }, query, this), this.searchDelay); |