Page MenuHomePhabricator

TypeError: Cannot read properties of null (reading 'getAttribute')
Open, Needs TriagePublic

Description

Error
message
Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')
trace
ve.ce.MWGalleryNode.js:70 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')
    at ve.ce.MWGalleryNode.onUpdate (ve.ce.MWGalleryNode.js:70:27)
    at later (oojs-ui-core.js:251:11)
ve.ce.MWGalleryNode.onUpdate	@	ve.ce.MWGalleryNode.js:70
later	@	oojs-ui-core.js:251
setTimeout (async)		
(anonymous)	@	oojs-ui-core.js:259
OO.EventEmitter.emit	@	oojs.js:858
ve.dm.Node.setLength	@	ve.dm.Node.js:741
ve.dm.Node.adjustLength	@	ve.dm.Node.js:754
ve.dm.BranchNode.splice	@	ve.dm.BranchNode.js:123
ve.dm.TreeModifier.static.applyTreeOperation	@	ve.dm.TreeModifier.js:351
ve.dm.TreeModifier.static.applyTreeOperations	@	ve.dm.TreeModifier.js:105
ve.dm.TreeModifier.process	@	ve.dm.TreeModifier.js:393
ve.dm.TransactionProcessor.process	@	ve.dm.TransactionProcessor.js:110
ve.dm.Document.commit	@	ve.dm.Document.js:391
ve.dm.Surface.changeInternal	@	ve.dm.Surface.js:970
ve.dm.Surface.change	@	ve.dm.Surface.js:939
ve.dm.SurfaceFragment.change	@	ve.dm.SurfaceFragment.js:125
(anonymous)	@	ve.dm.SurfaceFragment.js:1429
ve.dm.SurfaceFragment.isolateAndUnwrap	@	ve.dm.SurfaceFragment.js:1428
(anonymous)	@	ve.ui.FormatAction.js:65
ve.ui.FormatAction.convert	@	ve.ui.FormatAction.js:64
ve.ui.Surface.executeWithSource	@	ve.ui.Surface.js:716
ve.ui.Command.execute	@	ve.ui.Command.js:43
(anonymous)	@	ve.ui.Tool.js:143
fire	@	jquery.js:3223
add	@	jquery.js:3282
ve.ui.Tool.onSelect	@	ve.ui.Tool.js:142
OO.ui.ToolGroup.onMouseKeyUp	@	oojs-ui-toolbars.js:1323
OO.ui.PopupToolGroup.onMouseKeyUp	@	oojs-ui-toolbars.js:2238
OO.ui.ToolGroup.onDocumentMouseKeyUp	@	oojs-ui-toolbars.js:1304

Steps to reproduce:

You can reproduce this by selecting a gallery and then selecting "Heading" from the paragraph style which then replaces the gallery with three lines. Ideally, I think this action should have no effect and it does not for any other block nodes.

Screenshot/Screen capture:

Screenshot 2024-05-21 at 4.26.06 PM.png (1×2 px, 434 KB)

Browser: Chrome

Wiki: en.wiki