Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(mdTooltip): fix regression that broke tooltips on Firefox
Browse files Browse the repository at this point in the history
Remove check for pointer-events not equal to none to resolve non-visible tooltips on Firefox.
Add Chrome & Firefox as default test runners in karma task to avoid regressions like this in the future.

Closes #3047, #3250 and #3430
  • Loading branch information
Splaktar committed Jun 26, 2015
1 parent 98e91ae commit f51f2c8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gulp/tasks/karma-fast.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var util = require('../util');
var ROOT = require('../const').ROOT;
var args = util.args;

// NOTE: `karma-fas` does NOT pre-make a full build of JS and CSS
// NOTE: `karma-fast` does NOT pre-make a full build of JS and CSS
// exports.dependencies = ['build'];

exports.task = function (done) {
Expand All @@ -19,6 +19,7 @@ exports.task = function (done) {
if ( args.browsers ) {
karmaConfig.browsers = args.browsers.trim().split(',');
}
// NOTE: `karma-fast` does NOT test Chrome or Firefox by default.

gutil.log('Running unit tests on unminified source.');
karma.start(karmaConfig, captureError(clearEnv,clearEnv));
Expand Down
2 changes: 2 additions & 0 deletions gulp/tasks/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ exports.task = function (done) {

if ( args.browsers ) {
karmaConfig.browsers = args.browsers.trim().split(',');
} else {
karmaConfig.browsers = ['Chrome', 'Firefox', 'PhantomJS'];
}

gutil.log('Running unit tests on unminified source.');
Expand Down
2 changes: 0 additions & 2 deletions src/components/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe
function bindEvents () {
var mouseActive = false;
var enterHandler = function() {
if (!hasComputedStyleValue('pointer-events','none')) {
setVisible(true);
}
};
var leaveHandler = function () {
var autohide = scope.hasOwnProperty('autohide') ? scope.autohide : attr.hasOwnProperty('mdAutohide');
Expand Down
2 changes: 1 addition & 1 deletion src/components/tooltip/tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('<md-tooltip> directive', function() {
'Tooltip' +
'</md-tooltip>' +
'</md-button>'
)
);

// this focus is needed to set `$document.activeElement`
// and wouldn't be required if `document.activeElement` was settable.
Expand Down

0 comments on commit f51f2c8

Please sign in to comment.