Opened 8 years ago

Closed 8 years ago

#12480 closed defect (fixed)

scrollable is unnecessarily collapsing the current document selection

Reported by: Douglas Hays Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.6.0
Keywords: 1.7-mobile Cc:
Blocked By: Blocking:

Description

scrollable:addCover does a collapse of the window's selected text. This is breaking ComboBox which highlights the autocompleted text in a textbox that is unrelated to the touch/scroll DIV that is being scrolled/transformed. The collapse also hides the cursor from the ComboBox textbox.

Change History (3)

comment:1 Changed 8 years ago by ykami

The problem is not the cover, but the selection code at the end of addCover which destroys focus:

var sel;
if(dojo.global.getSelection){
        sel = dojo.global.getSelection();
        sel.collapse(dojo.doc.body, 0);
}else{
        sel = dojo.doc.selection.createRange();
        sel.setEndPoint("EndToStart", sel);
        sel.select();
}

It was basically for IE. IE unexpectedly makes selection when you try to do touch-scrolling. I found that setSelectable(this._cover, false); could prevent the selection. The above code in no longer necessary.

comment:2 Changed 8 years ago by ykami

(In [24064]) Refs #12480 !strict. Used setSelectable(this._cover, false) instead of collapsing the selection.

comment:3 Changed 8 years ago by ykami

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.