Page MenuHomePhabricator

[Regression] focus is not in value field after selecting a property for a new statement
Closed, ResolvedPublic

Description

Since the update this week, after I manually select a property the cursor is no longer focused and active in the field for the item. Instead I am needing to click into the field. I am wondering whether others are seeing that behaviour? (I'm using Firefox).

Another thing that changed is that when you tab on from the field to input an item (or string or whatever), the "Add qualifier" link is highlighted, but when I press Enter it saves the statement instead of adding a qualifier.

reported and confirmed users, and in multiple browsers
https://www.wikidata.org/wiki/Special:PermaLink/572760475#Since_update,_lost_cursor_focus_in_field

Event Timeline

thiemowmde subscribed.

I tried to reproduce this, and even did a "git bisect" to find a possible regression, but was unable to locate one. Can you please provide more detailed steps to reproduce the issue? For example:

  • What is the exact button you click to start your process? I assume you are clicking "add statement" to select a property that was not on the entity before.
  • What exactly are you typing? (Please provide a real world example, e.g. you are typing "occ" to find "occupation".)
  • Are you using the mouse or enter to select a property? Are you using the cursor keys?
  • What happens, and what do you expect?
  1. It happens on "add statement", works correctly for "add value"
  2. Well, let's take "instance of".
  3. Both don't work.
  4. The value field doesn't get selected as previously.

(using Safari on macOS High Sierra)

Can this be some side-effect of T124742? The JavaScript console is full of deprecated notices (pointing to the statement view as well).

Can this be some side-effect of T124742? The JavaScript console is full of deprecated notices (pointing to the statement view as well).

There were no official breaking changes in jQuery 3 that aren't covered by jQuery Migrate (apart from Deferred now being async, but it sometimes being sync was already unsupported). The deprecation notices mean things are working.

If this bug is triggered by a change in jQuery 3, it will not have a deprecation warning for where it went wrong.

I would recommend trying to reproduce this error on https://test.wikidata.org and, if it happens there, to first temporarily disable wgUsejQueryThree on testwikidatawiki only to verify if that is indeed the cause.

I tried to reproduce this, and even did a "git bisect" to find a possible regression, but was unable to locate one. Can you please provide more detailed steps to reproduce the issue? For example:

  • What is the exact button you click to start your process? I assume you are clicking "add statement" to select a property that was not on the entity before.
  • What exactly are you typing? (Please provide a real world example, e.g. you are typing "occ" to find "occupation".)
  • Are you using the mouse or enter to select a property? Are you using the cursor keys?
  • What happens, and what do you expect?

@thiemowmde

  • manually undertaking "add statement" or "add qualifier" [type property name or number, select it with mouse (usually)]
  • following selection of the property, there is no active cursor (it used to focus within the box for the addition of the item or data)

Typical example for me is

  • putting a "serial ordinal" for given names
  • following selection of the property I used to be able to just type the number as the cursor was focused in the corresponding field awaiting data input, now I have to click into the field to type the number.

This has been driving me nuts since Wednesday.

Go to extant "instance of" statement

Select Add Reference

Select property "stated in"

Text edit box for the reference appears but the focus does not move there

Click in the box, add the referece

Click +Add

Select another qualifer

Text edit box for the qualifier value appears, but again the focus does not move to the new text edit box

I tried to reproduce this, and even did a "git bisect" to find a possible regression, but was unable to locate one. Can you please provide more detailed steps to reproduce the issue? For example:

  • What is the exact button you click to start your process? I assume you are clicking "add statement" to select a property that was not on the entity before.
  • What exactly are you typing? (Please provide a real world example, e.g. you are typing "occ" to find "occupation".)
  • Are you using the mouse or enter to select a property? Are you using the cursor keys?
  • What happens, and what do you expect?

@thiemowmde

  • manually undertaking "add statement" or "add qualifier" [type property name or number, select it with mouse (usually)]
  • following selection of the property, there is no active cursor (it used to focus within the box for the addition of the item or data)

Typical example for me is

  • putting a "serial ordinal" for given names
  • following selection of the property I used to be able to just type the number as the cursor was focused in the corresponding field awaiting data input, now I have to click into the field to type the number.

Noting that "add value" for an existing property does not have this issue, it correctly has a cursor in field and takes text

thiemowmde raised the priority of this task from Low to High.Oct 6 2017, 11:20 AM
thiemowmde moved this task from incoming to consider for next sprint on the Wikidata board.
thiemowmde added a subscriber: Lydia_Pintscher.

Thanks for the additional information, that was very helpful. This is the line of code that still tries to set the focus to the value field after a property was selected, but now fails: https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/view/resources/jquery/wikibase/snakview/snakview.js;d07d991d6da9983cc45784b8695cea035dd5b54e$275. I stepped through the code and found that this line is still executed, but this happens a little to early. The values input box is not there the moment the focus is set. My theory is that something related to the "afterdraw" event changed in jQuery 3.

@Lydia_Pintscher, can you please track this ticket as you want it to be tracked, and possibly propose it for the next sprint?

Adding it to the list for the next sprint.

@thiemowmde triaged this task as Low priority.

@thiemowmde raised the priority of this task from Low to High.

Off-topic: I don't think lowering the priority of the task for the sole reason that additional information is expected is a good usage of this phabricator functionality.

I raised the priority to high, and you still have the nerve to complain? Seriously?

Lydia_Pintscher renamed this task from lost cursor focus in fields when adding property items to [Regression] focus is not in value field after selecting a property for a new statement.Oct 9 2017, 4:06 PM

Guys, let's take it down a notch :)
We're taking this in the new sprint tomorrow and hopefully get it fixed soon.

Change 383362 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[mediawiki/extensions/Wikibase@master] Fix: focus is not in value field after selecting a property

https://gerrit.wikimedia.org/r/383362

thiemowmde assigned this task to Aleksey_WMDE.
thiemowmde moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.
thiemowmde removed a project: Patch-For-Review.

Change 383362 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix: focus is not in value field after selecting a property

https://gerrit.wikimedia.org/r/383362