Results 1 to 2 of 2

Thread: No 'relatedTarget' in 'blur' event in IE

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member ragzovskii's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk, Russia
    Posts
    242

    Default No 'relatedTarget' in 'blur' event in IE

    Ext version tested:
    • Ext 5.0.1
    • Ext 4.2.2
    Browser versions tested against:
    • IE9
    • IE11(edge)
    • Chrome 38.0.21.25
    Description:
    • Blur event should have related target, but it doesn't
    Steps to reproduce the problem:


    • open console
    • double click any name to open editor
    • click outside of editor to blur it
    • check console and see there's no related target for IE and there is related target for Chrome

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    IE doesn't provide the relatedTarget, it's reproducible without Ext:

    Code:
    document.addEventListener("DOMContentLoaded", function() {
        var input1 = document.createElement('input');
        input1.type = 'text';
        input1.id = 'foo';
        input1.addEventListener('blur', function(e) {
            console.log(e.relatedTarget ? e.relatedTarget.id : 'input1#notarget');
        });
        document.body.appendChild(input1);
    
        var input2 = document.createElement('input');
        input2.type = 'text';
        input2.id = 'bar';
        input2.addEventListener('blur', function(e) {
            console.log(e.relatedTarget ? e.relatedTarget.id : 'input2#notarget');
        });
        document.body.appendChild(input2);
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •