Commit f36e443
committed
Media: Reset the URL search parameter when the grid view search is cleared.
The throttled `input` handler in `wp.media.view.MediaFrame.Manage` only called `gridRouter.navigate()` when the search value was non-empty, so emptying the search box left the `?search=` query parameter in the address bar. Reloading the page then re-parsed that stale parameter and refilled the input. So now the `navigate()` method is called unconditionally when the input changes in order to reset the URL back to the base `upload.php`.
Developed in WordPress#11938.
Follow-up to r41021.
Props mohamedahamed, abduremon, jorbin, ekla, drwpcom, anukasha, huzaifaalmesbah, noruzzaman, rejaulalomkhan, hmbashar, nadabulija, robert681, pedrofigueroa1989, westonruter.
Fixes #65298.
git-svn-id: https://develop.svn.wordpress.org/trunk@62470 602fd350-edb4-49c9-b593-d223f7449a821 parent 2784385 commit f36e443
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | 101 | | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments