-
-
Notifications
You must be signed in to change notification settings - Fork 335
[api] Explicitly passed URL should honored over $el.data.url #2581
Copy link
Copy link
Closed
Labels
type/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug
Milestone
Description
Bug Report
It seems like a bug, explicitly passed URL to $el.api() should be always preffered.
I have discovered this issue in atk4/ui where we set $modal.url for our purposes - https://github.com/atk4/ui/blob/4.0.0/js/src/plugins/create-modal.plugin.js#L18 - but then query API using the same element like $modal.api(...) with different URL for another purpose.
(for me - https://dev.agiletoolkit.org/demos/interactive/modal.php Multi Step Modal is broken for this reason)
Steps to reproduce
see https://jsfiddle.net/xj02cbog/
Expected result
Explicitly passed URL is preffered over URL from jQuery element data.
Actual result
URL from jQuery element data is preffered.
Version
2.9.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug