Rewritten tooltip and popover without jquery#24014
Rewritten tooltip and popover without jquery#24014Johann-S merged 1 commit intotwbs:v4-without-jqueryfrom
Conversation
|
Did you update our event system because you had issue with it ? Because currently we are able to register for more than one event on the same element |
There was a problem hiding this comment.
change not relevant here, please keep the affectation here
|
Before this, the same handler function cannot be registered and unregistered correctly for more than one element or event. That's why I removed the |
There was a problem hiding this comment.
Argh! This was an old branch, it seems that i've messed up this in a rebase..
There was a problem hiding this comment.
noop should be added to our Util object
There was a problem hiding this comment.
.on method explicitly checks for empty string, but selector can be undefined or null
Probably the check event handler should be modified
|
Can you make some tests on IE, on your computer ? because currently we cannot run our Saucelabs tests on folks PRs 😢 |
3400a49 to
e32b7ca
Compare
|
I've successfully executed the testsuite on chrome, chrome canary, firefox, safari, ie 11 and ms edge. Manual visual tests seem ok. |
There was a problem hiding this comment.
noop should return an empty function
There was a problem hiding this comment.
noop should be an empty function, but ESLint does not allow empty functions
There was a problem hiding this comment.
Disable that rule just for this line ;)
with // eslint-disable-next-line no-empty-function
There was a problem hiding this comment.
you should use notOk here because it's a failed case
e32b7ca to
f7b6b83
Compare
| _getConfig(config) { | ||
| config = $.extend( | ||
| if (typeof config !== 'undefined' && | ||
| typeof config.container === 'object' && config.container.jquery) { |
There was a problem hiding this comment.
what is it config.container.jquery ?
There was a problem hiding this comment.
Checks if config.container is a jquery object. In that case i'll get the dom element via [0] .
There was a problem hiding this comment.
that's right, I forgot about that property 😄
Tooltip and popover rewritten without jquery
The event system has been modified to allow registering the same handler for more than one event, delegate events in
.onemethod and unregistering one-off handlers through.offThe
delegateTargetproperty has been added to the event object, replacing the jquerycurrentTarget(native events' currentTarget property is read-only)