Hi !!
When I try to input value to the min/max fields, the cursor jumps to the end of number, restore the previous value of filed and update the page without any amendments. Slider behaves very strange too. After changing It sets new min and max value that I set as value and I can't extend the range. Default jQuery Version on site 1.8

Comments

IRONFELIX’s picture

Issue summary: View changes
maxplus’s picture

Hi,
I have the same issue and I did some testing.

When I leave the min value untouched and only enter something in the max value, It works like it should.

From the moment I enter something in the min value, It starts to act strange and from that moment it is impossible to enter a custom value in the max field.
You can still enter new values in the min field, and that keeps working, but the max field gets immediately overwritten from the moment that you try to enter a new value

It looks like the auto-submit delay is not respected on the max field, because it gets immediately overwritten after I enter a new value. That is not the case with the min field, there I see that the auto submit delay cleanly waits its time before submitting the new value...

I'm running:
- Drupal 7.31
- Search API 7.x-1.13
- Solr search 7.x-1.6
- Search ranges 7.x-1.5+9-dev (with patch https://www.drupal.org/node/2294807 to get the slider working correctly)

Could you also do the same test like I did? Thanks

IRONFELIX’s picture

In my case the max field is different than min field. If I try to enter something in max field, it ignores my value and immediately takes value like min field.

khiminrm’s picture

Hi! Please, try to modify two lines in search_api_ranges.js. Replace rangeFrom.bind('keyup', function() { with rangeFrom.bind('blur', function() { and rangeTo.bind('keyup', function() { with rangeTo.bind('blur', function() {. It helped me.

sja1’s picture

@khiminrm, thanks, works great! I've attached a patch with your fix.

sja1’s picture

Status: Active » Needs review

Changing status

guypaddock’s picture

Attached is a re-roll with the correct path strip level (p1).

Ravenight’s picture

#7 worked for me. I can now enter values into the max search range box correctly.

shasha_s’s picture

Hello!

drupal-7.36
search_api_ranges 7.x-1.x-dev (7.x-1.5+9-dev)
or
search_api_ranges 7.x-1.5

unfortunately the search_api_ranges-text-input-fix-2392435-7.patch and
search_api_ranges-existing-filter-tag-2294807-1.patch from https://www.drupal.org/node/2294807
did not help me. -of course I cheched that the patches applied correctly and changes were made.

With facet display widget - links, links with checkboces the filter works fine and deliver the correct values.
but when search api ranges come to play, the slider, min/max price fields does not work - after refresh the site, they still jump back to to default values and all items (products) are displayed.

What am I missing? How to solve please?

thanks
S.

jonloh’s picture

Status: Needs review » Reviewed & tested by the community

The current keyup is irritating that before I can finish typing the integer number, it jumps to auto submit. I know we can increase the delay time, but it wouldn't be an ideal solution.

+1 for changing from keyup to blur. Tested and working well with patch from #7.

handrus’s picture

Re-rolling #7 against master branch.

legolasbo’s picture

When depending on the 'blur' event, the javascript only fires after the input element loses focus. The attached patch takes a different approach and adds a delay to the input validation instead.

ptmkenny’s picture

Status: Reviewed & tested by the community » Needs review
suchdavid’s picture

Re-roll #11 against master.

sja1’s picture

Patch 13 is working for me. Is this working for enough people for us to move this to RTBC?

plazik’s picture

Status: Needs review » Reviewed & tested by the community

#14 works for me too.

nikhil banait’s picture

#14 working fine.

Scott Robertson’s picture

Scott Robertson’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.