My version of GXT is 3.1.1
There is a focus bug in (at least) com.sencha.gxt.widget.core.client.tree.Tree element.
On click it tries to position focus element (focusEl) at the click coordinates, which are taken from the event:
Event has coordinates relative to visible page (i.e. without scrolling). When setXY transforms them to left/top values (XElement#translatePoints) it uses absolute coordinates (i.e scrolling included, line 2176 in XElement).
So, if document under the Tree has been scrolled down, clicking on the Tree would set a negative Y coordinate to focusEl (same is true for X, it's just less likely to happen in real life). In some browsers (namely in Firefox) this would cause a sudden up scroll.
There is a focus bug in (at least) com.sencha.gxt.widget.core.client.tree.Tree element.
On click it tries to position focus element (focusEl) at the click coordinates, which are taken from the event:
Code:
focusEl.setXY(event.getClientX(), event.getClientY());
Event has coordinates relative to visible page (i.e. without scrolling). When setXY transforms them to left/top values (XElement#translatePoints) it uses absolute coordinates (i.e scrolling included, line 2176 in XElement).
So, if document under the Tree has been scrolled down, clicking on the Tree would set a negative Y coordinate to focusEl (same is true for X, it's just less likely to happen in real life). In some browsers (namely in Firefox) this would cause a sudden up scroll.
A sudden scroll in Firefox clicking on Tree element
Aucun commentaire:
Enregistrer un commentaire