Comments (7)
Hi,
I am also facing same issue as James.
Can anyone guide me to fix it ?
from bootstrap-iconpicker.
Hello James,
I looked inside the code and find the root cause of the issue. it will close the icon picker popup on selection or click on body part.
You can fix it by override close event of bootstrap dialog.
close: function () {
$('.iconpicker').each(function () {
if (!$(this).is(e.target) &&
$(this).popover('destroy');
}
});
this._super.apply(this, arguments);
}
from bootstrap-iconpicker.
It seems to be related to the pull request that I created:
#20
Do you have the same bug if you specify the dialog as the iconpicker container?
from bootstrap-iconpicker.
Yes
I have same issue.
from bootstrap-iconpicker.
Maybe you can solve using the div tag instead of the button label.
In the latest version, this feature is included.
- .
- Support for button and div tags.
- All
iconset
includes the empty icon value. - Option
rows
accepts the value 0 to indicate all rows. - Add options:
align
header
footer
- Add methods:
setAlign
setHeader
setFooter
- Support for 1 more icon fonts:
from bootstrap-iconpicker.
@victor-valencia
I'm not sure how using the div
tag instead of button label will resolve the issue, as I need the selection of an icon to be via a popup, not a panel within an existing panel.
@merildev
Not the same problem sorry.
@dhp-denero
Thank you for the tip. Not exactly what I needed but I didn't realise I could call destroy, so using your code I managed to write the following:
onEscape: function () {
$('#selectPanelIcon').each(function () {
$(this).popover('destroy');
});
return true;
},
This works perfectly with bootstrap-iconpicker
, which is what I was using. I found that the above doesn't cause any exceptions, even if there is no active popover.
However I would suggest that the API for iconpicker
include an option to allow open/close of the icon selection popup, maybe something along the lines of the following:
$('#target').iconpicker('openPicker');
$('#target').iconpicker('closePicker');
from bootstrap-iconpicker.
Here is my solution, i just made the button toggle, in version 1.7.0 line 466:
$this.off("click").on('click', function(e) {
e.preventDefault();
if (!$this.data('bs.popover')) {
$this.popover({
animation: false,
trigger: 'manual',
html: true,
content: op.table,
container: 'body',
placement: op.placement
}).on('shown.bs.popover', function () {
data.switchPage(op.icon);
data.bindEvents();
});
$this.data('bs.popover').tip().addClass('iconpicker-popover');
$this.popover('show');
} else {
$this.popover('destroy');
}
});
from bootstrap-iconpicker.
Related Issues (20)
- will this support bootstrap5 in the furture? HOT 2
- support for fontawesome5 pro icons?
- Is this Plugin maintained?
- npm package HOT 3
- Show only FontAwesome 4.7 icons HOT 1
- selectedClass not being added with custom icon set
- CSS overwrites BS styling for .popover
- Problem size popover and input-group button HOT 1
- A search box does not work within a modal. HOT 1
- Adding support for iconset version change
- Search is case sensitive, but icons are all lower case
- 'setIcon' doesn't add the selectedClass to the icon
- FR: add 'get...' functions
- [Feature Request]: Multiple Iconsets
- Using js to set the iconpicker to a button hides it behind bootstrap modals. HOT 1
- Initializes an iconpicker with options not working
- Provided: Add latest fontawesome 5 (5.14.0_pro)
- How to use bootstrap-iconpicker with react? HOT 1
- Would you accept a PR adding support for Line-Awesome?
- Tiktok Icon Missing HOT 1
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 bootstrap-iconpicker.