mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
Bug 457688: click redispatching doesn't take into account sidebar offsets, r=mfinkle
This commit is contained in:
parent
5026f83f51
commit
1e26364bd1
@ -755,11 +755,12 @@
|
||||
<parameter name="aClientX"/>
|
||||
<parameter name="aClientY"/>
|
||||
<body><![CDATA[
|
||||
// Need to adjust for the toolbar height, etc.
|
||||
var browserTop = this.browser.getBoundingClientRect().top;
|
||||
// Need to adjust for the deckbrowser not being at 0,0
|
||||
// (e.g. due to other browser UI)
|
||||
var browserRect = this.getBoundingClientRect();
|
||||
|
||||
var clickOffsetX = this._screenToPage(aClientX) + this.dragData.pageX;
|
||||
var clickOffsetY = this._screenToPage(aClientY - browserTop) + this.dragData.pageY;
|
||||
var clickOffsetX = this._screenToPage(aClientX - browserRect.left) + this.dragData.pageX;
|
||||
var clickOffsetY = this._screenToPage(aClientY - browserRect.top) + this.dragData.pageY;
|
||||
|
||||
// Scroll the browser so that the event is targeted properly
|
||||
var cwin = this.browser.contentWindow;
|
||||
|
Loading…
Reference in New Issue
Block a user