Use cross-browser document.activeElement instead of (non-IE) event.target.activeElement

Conflicts:
	CONTRIBUTORS.rst
pull/2612/head
riceyrice 2016-05-12 13:26:50 +01:00 zatwierdzone przez Matt Westcott
rodzic 0eaac1882c
commit 0899c48117
4 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -55,6 +55,7 @@ Changelog
~~~~~~~~~~~~~~~~~~
* Fix: Paste / drag operations done entirely with the mouse are now correctly picked up as edits within the rich text editor (Matt Fozard)
* Fix: Logic for cancelling the "unsaved changes" check on form submission has been fixed to work cross-browser (Stephen Rice)
1.4.4 (10.05.2016)

Wyświetl plik

@ -137,6 +137,7 @@ Contributors
* Juha Yrjölä
* Bojan Mihelac
* Robert Moggach
* Stephen Rice
Translators
===========

Wyświetl plik

@ -14,3 +14,4 @@ Bug fixes
~~~~~~~~~
* Paste / drag operations done entirely with the mouse are now correctly picked up as edits within the rich text editor (Matt Fozard)
* Logic for cancelling the "unsaved changes" check on form submission has been fixed to work cross-browser (Stephen Rice)

Wyświetl plik

@ -67,7 +67,7 @@ function enableDirtyFormCheck(formSelector, options) {
window.addEventListener('beforeunload', function(event) {
// Ignore if the user clicked on an ignored element
var triggeredByIgnoredButton = false;
var $trigger = $(event.target.activeElement);
var $trigger = $(event.explicitOriginalTarget || document.activeElement);
$ignoredButtons.each(function() {
if ($(this).is($trigger)) {