Repository navigation
Fix highlighting bugs #1149 and #1142 by preventing nested highlight <span>'s - #1193
Conversation
… nested highlight <span>'s
|
Feel free to adjust the comments as needed. I figured they'd help with refactoring down the road. |
|
Thanks, I'll try to test soon |
|
@joallard, I did run all the tests before submitting this PR, so hopefully this is an easy merge on your end. Thanks again. Looking forward to having this bugfix live! |
|
I'm really out of time here and I think i've seen other PRs tackling the same bug, so that leaves me a little puzzled without having tested it. Real sorry about that by the way. If you'd be able to give me some reassurance it's really fixed, I'd be down to merge. |
|
Changes Unknown when pulling e6bcc6c on pranksinatra:bugfix-highlight into * on selectize:master*. |
|
No problem. I added a test for this bugfix based on Wardrop's example in #1142, and also wrote (and passed) a test for nextriot's example in #1149, which I omitted from the PR b/c they test the same thing. I couldn't find other PR's also solving this issue, but I did create a test (locally) for the other highlighting issue (first character, #1141), and have verified that my bugfix does not resolve it (though I'm guessing the #1169 patch does..) I don't have time to wade into #1141 tonight but if you'd like to try out this test, go for it! it('should not continue highlighting first-matched letter if input is backspaced', function(done) {
var test = setup_test('<select>' +
'<option></option>' +
'<option value="a">Cleveland</option>' +
'<option value="b">Cincinnati</option>' +
'<option value="c">San Francisco</option>' +
'</select>', {});
click(test.selectize.$control, function() {
syn.type('cin', test.selectize.$control_input)
syn.type('\b\b\b', test.selectize.$control_input)
.delay(0, function() {
expect(test.selectize.$dropdown_content.find('.highlight').length).to.be.equal(0);
done();
});
});
}); |
|
That sounds great @pranksinatra , thanks! |
|
This is great, but I was wondering when this will be officially released. It seems like it has been more than a year already. Is the project being maintained anymore? |
|
I did test the changes in my code and now it works as intended now. This fixes the #1345 |
No description provided.