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

Fix special char issue in firefox #1201

Closed
wants to merge 1 commit into from

Conversation

topaxi
Copy link
Contributor

@topaxi topaxi commented Nov 15, 2016

I've noticed that in Firefox with newer versions of jQuery (version 2 or 3), that special characters like @, - or even umlauts like ä won't be inserted into the select box.

I've tracked down the bug to the measureString function, I don't know what is really causing the bug, but if I remove the $test element asynchronously, it seems to be working in Firefox again.

Might be related to #809.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling bfe25a9 on topaxi:firefox-special-char-issue into * on selectize:master*.

src/utils.js Outdated
@@ -253,7 +253,7 @@ var measureString = function(str, $parent) {
]);

var width = $test.width();
$test.remove();
setTimeout(function() { $test.remove(); $test = null }, 0);

Choose a reason for hiding this comment

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

The $test = null doesn't seem to be very useful here

@ThiefMaster
Copy link

ThiefMaster commented Feb 20, 2017

This issue seems to be caused by the body element using flex display. Here's a codepen with a minimal example reproducing it: http://codepen.io/ThiefMaster/pen/zNVJRB

It smells like a Firefox bug but this workaround would indeed help.

Getting a bugfix release containing this fix would be very useful to our project since we have users complaining about this problem.

@ThiefMaster
Copy link

https://bugzilla.mozilla.org/show_bug.cgi?id=1341030

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling dc82f00 on topaxi:firefox-special-char-issue into ** on selectize:master**.

@topaxi
Copy link
Contributor Author

topaxi commented Aug 6, 2019

Since Firefox has patched the issue on their side I'm going to close this :)

@topaxi topaxi closed this Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants