Comments (2)
The default behavior is to toggle when clicking. Thats why it closes right away. I'm not sure an alwaysOpen option would be the right approach.
You could try to not attach the jBox and do the opening and closing manually. I tried in your codePen example, but there were too many errors because it uses the attached elements etc. These are not exposed when doing it manually.
Check out this fiddle, thats what I quickly came up with how you would have more control on when the tooltip should open or close:
https://jsfiddle.net/StephanWagner/tvp5L7mw/
from jbox.
@StephanWagner thanks your answering 😊
I found out , I miss use the jbox , the e.stopPropagation() on input maybe a better way to do so
// 避免 focus 時 , 再次點擊讓 tooltip 關閉
$(filterSelect).find('input').on('click', function(e) {
const isFocus = (this === document.activeElement)
const isEditMode = (filterSelect.getAttribute('data-mode') === 'edit')
if (isFocus && isEditMode) {
e.preventDefault()
e.stopPropagation()
}
})
I updated my codepen use case : https://codepen.io/andrew781026/pen/JjNxmxY
from jbox.
Related Issues (20)
- How i register scroll event on main block with jbox options ? HOT 4
- Tooltip - best way to grab element to use as content HOT 2
- Invalid z-index for tooltip attached to an element placed in jbox modal
- Add ability to set default z-index for all jBox instances
- Modal not opening first time click. HOT 7
- JQMIGRATE: jQuery.type is deprecated HOT 4
- How can use confirm box to submit the form? HOT 6
- Dynamic content causes height of modal to exceed window height with no scrolling HOT 4
- zindex auto with bootstrap modals HOT 1
- Example please HOT 2
- 为啥会隐藏已有的title标签 HOT 1
- Closing jBox from Content HOT 2
- svg as part of jBox content doesn't display properly, getting closeButton styling HOT 1
- jbox tooltip stay on screen after element destroyed HOT 1
- Close all tooltips when opening new HOT 2
- Attach JBox tooltip to disabled button HOT 2
- How to prevent jBox from closing? HOT 2
- Bootstrap Datatables Issue HOT 1
- closeButton: true does not produce a close Button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jbox.