-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug: loading elements shown when using preload and laoding-states extensions #78
Comments
Hey, |
@Telroshan that'd be great, but do you think it may be better to make the preload extension expose a function to check if the request is a preload request or not? Just to be clear, I'm not sure if that's feasible because I haven't really looked at the internals of htmx. This way, if there are extensions being developed by others that may need to interact nicely with preload, they can use that public API of preload instead of relying on checking for the internal data properties that may or may not be different between various versions of the preload extension. EDIT: spelling mistake |
Sounds good to me @guacs ! Anyways, feel free to submit a PR for whatever way you prefer to handle that! |
When both the
preload
andloading-states
extension is used together, whenever a preload initiates a request, the loading indicator becomes visible. This is usually not a problem if we use the default preload behavior of only making the request on mousedown, but this becomes an issue if we set preload to mouseover. Here's a reproduction of the behavior:In the above example, the
Loading....
p tag becomes visible when you hover over the button and not just when you click on it.The text was updated successfully, but these errors were encountered: