Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299053

How to NOT turn element read only when waiting for '#ajax' callback?

$
0
0

I need a live scan on user's input, much like autocomplete does. I cannot afford to disable the field when user writes in it, as this is irritating. On the other hand, I need to create form elements based on certain markup in a given field, and I need it live, so people could see their typos, like:
"New token [trnaslation]. Did you mean [translation]?"

So I have code like this:

<?php
'#ajax'=> array(
 
'callback'=> 'mymodule_tag',
 
'wrapper'=> 'edit-tags',
 
'method'=> 'replace',
 
'effect'=> 'fade',
 
'event'=> 'input',
),
?>

And it works, but blocks user input. Any way to make it non-blocking? Or do I need to fall back to "rescan" button?

Viewing all articles
Browse latest Browse all 299053

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>