mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 499277: Once unzoomed, dblClick can throw an error - aElement is null, r=mfinkle
This commit is contained in:
parent
7ffd78b491
commit
d8a0e703b2
@ -718,7 +718,7 @@ function ContentClickingModule(owner) {
|
||||
this._owner = owner;
|
||||
this._clickTimeout = -1;
|
||||
this._events = [];
|
||||
this._zoomed = false;
|
||||
this._zoomedTo = null;
|
||||
}
|
||||
|
||||
ContentClickingModule.prototype = {
|
||||
@ -798,12 +798,14 @@ ContentClickingModule.prototype = {
|
||||
let firstEvent = this._events[0].event;
|
||||
let zoomElement = optimalElementForPoint(firstEvent.clientX, firstEvent.clientY);
|
||||
|
||||
if (zoomElement != this._zoomedTo) {
|
||||
this._zoomedTo = zoomElement;
|
||||
Browser.canvasBrowser.zoomToElement(zoomElement);
|
||||
} else {
|
||||
this._zoomedTo = null;
|
||||
Browser.canvasBrowser.zoomFromElement(zoomElement);
|
||||
if (zoomElement) {
|
||||
if (zoomElement != this._zoomedTo) {
|
||||
this._zoomedTo = zoomElement;
|
||||
Browser.canvasBrowser.zoomToElement(zoomElement);
|
||||
} else {
|
||||
this._zoomedTo = null;
|
||||
Browser.canvasBrowser.zoomFromElement(zoomElement);
|
||||
}
|
||||
}
|
||||
|
||||
this._owner.ungrab(this);
|
||||
|
Loading…
Reference in New Issue
Block a user