Closed Bug 1680323 Opened 5 years ago Closed 4 years ago

Switching tabs while editing a text field on workday.com causes the cursor to jump from the middle of the text to the beginning.

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: annyG, Unassigned)

Details

  1. Open workday.com and go to performance tab to edit your goal. Place your cursor in the middle of the text and type something
  2. Open a new tab, navigate to some site and then switch to workday.com tab

Expected: cursor stays in the same position

Actual: cursor is now placed at the beginning of the text field.

I tested this in Chrome and it works as expected.

Hmm, the website requests to register personal info even running the demo... If nobody of those who can debug it has tried, I'll try to do it though.

Flags: needinfo?(krosylight)

I think I should call this a website bug. Something resets innerHTML when focusing out and that clears the selection. Unfortunately it's extremely hard to debug because the eval()ed script is obfuscated and the stack is 20+ long.

(The page uses CKEditor 4 but the caller is outside of that.)

Flags: needinfo?(krosylight)

And BTW this also happens on Chrome. 🤷‍♀️

S4 since I think it's not a browser-side issue.

Severity: -- → S4

Hi Karl, do we have a contact to Workday to get this one fixed?

Hey Anny, I can consistently reproduce this also in Chrome, could you double check just in case?

Thanks!

Flags: needinfo?(kdubost)
Flags: needinfo?(agakhokidze)

Kagami,
not that I know but Mozilla IT has probably contact with them.

Also
https://github.com/Workday
And here you can discover people working at WorkDay that can be contacted. https://github.com/search?q=workday&type=users

Flags: needinfo?(kdubost)

There are a couple of place where the focus/blur is happening.

blur on https://www.myworkdaycdn.com/wday/uiclient/static/gwt-desktop/2021.02.009/wd-application-chrome/wd-application-chrome.min.js?plate=BMT216A

        this.documentLevelClickHandler = function (e) {
          var t = e.target;
          e instanceof FocusEvent && (t = e.relatedTarget),
          t && (t.hasAttribute('data-quickaccess-button') || n.isClickInsideQuickAccess(t) || n.quickAccessPopupOutsideClickHandler())
        },
        document.addEventListener('blur', this.documentLevelClickHandler, !0)

and focus in https://www.myworkdaycdn.com/wday/uiclient/static/gwt-desktop/2021.02.009/WorkdayCKEditor1.1.24/ckeditor.js?plate=BMT216A

 CKEDITOR.dom.domObject.prototype = function () {
    var a = function (a, b) {
      return function (d) {
        'undefined' != typeof CKEDITOR && a.fire(b, new CKEDITOR.dom.event(d))
      }
    };
    return {
      getPrivate: function () {
        var a;
        (a = this.getCustomData('_')) || this.setCustomData('_', a = {
        });
        return a
      },
      on: function (e) {
        var b = this.getCustomData('_cke_nativeListeners');
        b || (b = {
        }, this.setCustomData('_cke_nativeListeners', b));
        b[e] || (b = b[e] = a(this, e), this.$.addEventListener ? this.$.addEventListener(e, b, !!CKEDITOR.event.useCapture) : this.$.attachEvent && this.$.attachEvent('on' + e, b));
        return CKEDITOR.event.prototype.on.apply(this, arguments)
      },
      removeListener: function (a) {
        CKEDITOR.event.prototype.removeListener.apply(this, arguments);
        if (!this.hasListeners(a)) {
          var b = this.getCustomData('_cke_nativeListeners'),
          d = b && b[a];
          d && (this.$.removeEventListener ? this.$.removeEventListener(a, d, !1) : this.$.detachEvent && this.$.detachEvent('on' + a, d), delete b[a])
        }
      },
      removeAllListeners: function () {
        var a = this.getCustomData('_cke_nativeListeners'),
        b;
        for (b in a) {
          var d = a[b];
          this.$.detachEvent ? this.$.detachEvent('on' + b, d) : this.$.removeEventListener && this.$.removeEventListener(b, d, !1);
          delete a[b]
        }
        CKEDITOR.event.prototype.removeAllListeners.call(this)
      }
    }
  }()

Unfortunately I am not able to test this anymore as we switched away from using workday for our goals and I can't edit any of my existing goals to replicate this scenario again.

Flags: needinfo?(agakhokidze)

Hmm, I intend to close this then, since I think no one can edit workday goals anymore and my last observation was that this also happened on Chrome. Any objections?

no objections from me!

Cool. Feel free to reopen if anyone else disagrees.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.