Merge pull request #1761 from tonio/chrome_buttons
Fix button tips not disappearing on Chrome
This commit is contained in:
@@ -52,6 +52,13 @@ ol.control.FullScreen = function(opt_options) {
|
||||
goog.events.EventType.TOUCHEND
|
||||
], this.handleClick_, false, this);
|
||||
|
||||
goog.events.listen(button, [
|
||||
goog.events.EventType.MOUSEOUT,
|
||||
goog.events.EventType.FOCUSOUT
|
||||
], function() {
|
||||
this.blur();
|
||||
}, false);
|
||||
|
||||
goog.events.listen(goog.global.document, goog.dom.fullscreen.EventType.CHANGE,
|
||||
this.handleFullScreenChange_, false, this);
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@ ol.control.Zoom = function(opt_options) {
|
||||
goog.events.EventType.CLICK
|
||||
], goog.partial(ol.control.Zoom.prototype.zoomByDelta_, delta), false, this);
|
||||
|
||||
goog.events.listen(inElement, [
|
||||
goog.events.EventType.MOUSEOUT,
|
||||
goog.events.EventType.FOCUSOUT
|
||||
], function() {
|
||||
this.blur();
|
||||
}, false);
|
||||
|
||||
var tTipsZoomOut = goog.dom.createDom(goog.dom.TagName.SPAN, {
|
||||
'role' : 'tooltip',
|
||||
'type' : 'button'
|
||||
@@ -69,6 +76,13 @@ ol.control.Zoom = function(opt_options) {
|
||||
goog.events.EventType.CLICK
|
||||
], goog.partial(ol.control.Zoom.prototype.zoomByDelta_, -delta), false, this);
|
||||
|
||||
goog.events.listen(outElement, [
|
||||
goog.events.EventType.MOUSEOUT,
|
||||
goog.events.EventType.FOCUSOUT
|
||||
], function() {
|
||||
this.blur();
|
||||
}, false);
|
||||
|
||||
var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE;
|
||||
var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, inElement,
|
||||
outElement);
|
||||
|
||||
@@ -47,11 +47,18 @@ ol.control.ZoomToExtent = function(opt_options) {
|
||||
goog.dom.appendChild(button, tip);
|
||||
goog.dom.appendChild(element, button);
|
||||
|
||||
goog.events.listen(element, [
|
||||
goog.events.listen(button, [
|
||||
goog.events.EventType.TOUCHEND,
|
||||
goog.events.EventType.CLICK
|
||||
], this.handleZoomToExtent_, false, this);
|
||||
|
||||
goog.events.listen(button, [
|
||||
goog.events.EventType.MOUSEOUT,
|
||||
goog.events.EventType.FOCUSOUT
|
||||
], function() {
|
||||
this.blur();
|
||||
}, false);
|
||||
|
||||
goog.base(this, {
|
||||
element: element,
|
||||
target: options.target
|
||||
|
||||
Reference in New Issue
Block a user