Fix login page fragment handling after soft reload on Firefox (#353)
* Fix login page fragment handling after soft reload on Firefox. * Add comments. * Move changelog entry to correct place. Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
		
							parent
							
								
									c49d3628cd
								
							
						
					
					
						commit
						9670f54dd0
					
				|  | @ -8,6 +8,8 @@ | |||
| 
 | ||||
| ## Changes since v5.0.0 | ||||
| 
 | ||||
| - [#353](https://github.com/pusher/oauth2_proxy/pull/353) Fix login page fragment handling after soft reload on Firefox (@ffdybuster) | ||||
| 
 | ||||
| # v5.0.0 | ||||
| 
 | ||||
| ## Release Hightlights | ||||
|  |  | |||
|  | @ -135,6 +135,12 @@ func getTemplates() *template.Template { | |||
| 			(function() { | ||||
| 				var inputs = document.getElementsByName('rd'); | ||||
| 				for (var i = 0; i < inputs.length; i++) { | ||||
| 					// Add hash, but make sure it is only added once
 | ||||
| 					var idx = inputs[i].value.indexOf('#'); | ||||
| 					if (idx >= 0) { | ||||
| 						// Remove existing hash from URL
 | ||||
| 						inputs[i].value = inputs[i].value.substr(0, idx); | ||||
| 					} | ||||
| 					inputs[i].value += window.location.hash; | ||||
| 				} | ||||
| 			})(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue