Page MenuHomePhabricator

Implementation Code Editor - cursor jumps to end after every stroke
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
If you need a function follow steps 1&2. If not jump to step 3.

  1. Go to sandbox edit: http://localhost:8080/wiki/Special:ApiSandbox#action=wikilambda_edit&format=json&summary=New%20And%20type&token=%2B\
  1. Enter the following in zobject text box and then click "make request".
{
	"Z1K1": "Z2",
	"Z2K1": {
		"Z1K1": "Z6",
		"Z6K1": "Z0"
	},
	"Z2K2": {
		"Z1K1": "Z8",
		"Z8K1": [
			"Z17",
			{
				"Z1K1": "Z17",
				"Z17K1": "Z40",
				"Z17K2": "Z0K1",
				"Z17K3": {
					"Z1K1": "Z12",
					"Z12K1": [
						"Z11",
						{
							"Z1K1": "Z11",
							"Z11K1": "Z1002",
							"Z11K2": "first input"
						}
					]
				}
			},
			{
				"Z1K1": "Z17",
				"Z17K1": "Z40",
				"Z17K2": "Z0K2",
				"Z17K3": {
					"Z1K1": "Z12",
					"Z12K1": [
						"Z11",
						{
							"Z1K1": "Z11",
							"Z11K1": "Z1002",
							"Z11K2": "second input"
						}
					]
				}
			}
		],
		"Z8K2": "Z40",
		"Z8K3": [ "Z20" ],
		"Z8K4": [ "Z14" ],
		"Z8K5": "Z0"
	},
	"Z2K3": {
		"Z1K1": "Z12",
		"Z12K1": [
			"Z11",
			{
				"Z1K1": "Z11",
				"Z11K1": "Z1002",
				"Z11K2": "And"
			}
		]
	}
}
  1. Go to the createZObject special page: http://localhost:8080/wiki/Special:CreateZObject?view=zobject-editor
  1. Under "Contents" select the type "Implementation"
  1. If you followed steps 1&2, select the function 'And'. Otherwise select your function.
  1. Select 'Code' from the dropdown.
  1. Type some code.

What happens?:
After every key stroke the cursor jumps to the end.

What should have happened instead?:
Cursor should not do that.

Other information (browser name/version, screenshots, etc.):
This *might* be related to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiLambda/+/817901

Details

Related Changes in Gerrit:

Event Timeline

Change 820780 had a related patch set uploaded (by EWright; author: EWright):

[mediawiki/extensions/WikiLambda@master] Fix cursor bug.

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

Change 820780 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Fix cursor bug.

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