Searchbox Gymnastics

50 views
Skip to first unread message

Brad Moran

unread,
May 7, 2021, 11:42:33 PM5/7/21
to Ajax.org Cloud9 Editor (Ace)
Every once in a while, the searchbox gets into a mode where after typing a character into the input field, it jumps into the editor; so you can only type 1 character at a time. I have the source to the searchbox but can't figure out what could be causing this

Brad Moran

unread,
Jan 28, 2022, 12:05:02 AM1/28/22
to Ajax.org Cloud9 Editor (Ace)
This continues to be an issue and I have a bit more info.

I can reproduce it by pasting, and then giving focus to the input field in the search box. Pressing any key will cause a find event, and the cursor will jump into the editor. It seems like some listener gets stuck, but I'm having a heck of a time finding it. 

Message has been deleted

Brad Moran

unread,
Jan 29, 2022, 11:16:35 AM1/29/22
to Ajax.org Cloud9 Editor (Ace)
I've partially figured this out. There seems to be a leftover delayed event that is triggered by a "changeSelection" event.  I've been able to stop the action with this:

this.$initOperationListeners - function(){
...
        this.on("changeSelection", function() {
            if (this.searchBox && this.searchBox.active)
                return;

I'm sure it's not the correct fix, but it's keeping me from smashing my monitor or throwing my keyboard for now. Any genius insiders  who know what might be the actual problem I have a test set up.
Reply all
Reply to author
Forward
0 new messages