Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 : Making .tooltip('show') throw an error on elements with display:none #20940

Merged
merged 1 commit into from
Nov 1, 2016
Merged

v4 : Making .tooltip('show') throw an error on elements with display:none #20940

merged 1 commit into from
Nov 1, 2016

Conversation

Johann-S
Copy link
Member

I made this PR for this feature request in #17021 :

Consider making .tooltip('show') throw an error when the target is display: none per #14155

try {
$('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

try {
$('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

try {
$('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

@@ -185,6 +185,19 @@ $(function () {
.bootstrapTooltip('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

try {
$('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

try {
$('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

try {
$('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show')
}
catch (err) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing curly brace does not appear on the same line as the subsequent block brace-style

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {
assert.expect(1)
var done = assert.async()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

@@ -320,4 +320,16 @@ $(function () {
.bootstrapPopover('show')
})

QUnit.test('should throw an error when show is called on hidden elements', function (assert) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback

@Johann-S Johann-S changed the title Making .tooltip('show') throw an error on elements with display:none v4 : Making .tooltip('show') throw an error on elements with display:none Oct 20, 2016
@Johann-S
Copy link
Member Author

I know it's not a major feature but If you can review this PR @mdo or @bardiharborow thank you ❤️

@mdo
Copy link
Member

mdo commented Oct 28, 2016

I don't know jack about JS, but I like this as a preventative feature.

@mdo mdo added this to the v4.0.0-alpha.6 milestone Nov 1, 2016
@mdo mdo merged commit a7f1b59 into twbs:v4-dev Nov 1, 2016
@mdo mdo mentioned this pull request Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants