Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing "/devtools" results in a draft error #6436

Closed
turt2live opened this issue Apr 3, 2018 · 11 comments · Fixed by matrix-org/matrix-react-sdk#1961
Closed

Typing "/devtools" results in a draft error #6436

turt2live opened this issue Apr 3, 2018 · 11 comments · Fixed by matrix-org/matrix-react-sdk#1961
Labels
P2 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@turt2live
Copy link
Member

Description

Uncaught DOMException: Failed to execute 'extend' on 'Selection': This Selection object doesn't have any Ranges.
    at addFocusToSelection (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:189960:18)
    at setDraftEditorSelection (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:189896:6)
    at DraftEditorLeaf._setSelection (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:185882:6)
    at DraftEditorLeaf.componentDidMount (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:185896:11)
    at https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:315412:26
    at measureLifeCyclePerf (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:315223:13)
    at https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:315411:12
    at CallbackQueue.notifyAll (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:122028:23)
    at ReactReconcileTransaction.close (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:320251:27)
    at ReactReconcileTransaction.closeAll (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:50051:26)
    at ReactReconcileTransaction.perform (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:49998:17)
    at ReactUpdatesFlushTransaction.perform (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:49985:21)
    at ReactUpdatesFlushTransaction.perform (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:16522:33)
    at Object.flushBatchedUpdates (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:16605:20)
    at ReactDefaultBatchingStrategyTransaction.closeAll (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:50051:26)
    at ReactDefaultBatchingStrategyTransaction.perform (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:49998:17)
    at Object.batchedUpdates (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:318626:27)
    at Object.batchedUpdates (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:16530:28)
    at dispatchEvent (https://riot.im/develop/bundles/87fb79895c26248100ed/bundle.js:318925:21)

Steps to reproduce

  • In the composer, type /devtools
  • Press enter

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 65
  • OS: Windows 10
  • URL: riot.im/develop
@lampholder
Copy link
Member

@turt2live is this still a problem for you? It seems to be working fine for me :\

@turt2live
Copy link
Member Author

@lampholder yes

setDraftEditorSelection.js:186 Uncaught DOMException: Failed to execute 'extend' on 'Selection': This Selection object doesn't have any Ranges.
    at addFocusToSelection (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:190027:18)
    at setDraftEditorSelection (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:189963:6)
    at DraftEditorLeaf._setSelection (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:185949:6)
    at DraftEditorLeaf.componentDidMount (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:185963:11)
    at https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:315358:26
    at measureLifeCyclePerf (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:315169:13)
    at https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:315357:12
    at CallbackQueue.notifyAll (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:121886:23)
    at ReactReconcileTransaction.close (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:320197:27)
    at ReactReconcileTransaction.closeAll (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:50101:26)
    at ReactReconcileTransaction.perform (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:50048:17)
    at ReactUpdatesFlushTransaction.perform (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:50035:21)
    at ReactUpdatesFlushTransaction.perform (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:16520:33)
    at Object.flushBatchedUpdates (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:16603:20)
    at ReactDefaultBatchingStrategyTransaction.closeAll (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:50101:26)
    at ReactDefaultBatchingStrategyTransaction.perform (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:50048:17)
    at Object.batchedUpdates (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:318572:27)
    at Object.batchedUpdates (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:16528:28)
    at dispatchEvent (https://riot.im/develop/bundles/f316e5123e80544ce313/bundle.js:318871:21)

@turt2live
Copy link
Member Author

@lampholder were you able to reproduce this?

@t3chguy
Copy link
Member

t3chguy commented May 16, 2018

might get fixed by M's Slate stuff

@turt2live
Copy link
Member Author

Lots of issues might. I think I have 8 RTE issues alone. Was just hoping to get rid of the label because acute ocd.

@lampholder
Copy link
Member

SORRY - this bug is that it results in an error, not that that error causes any problems (beyond cluttering the console, which is a problem worth fixing).

So yes, I can totally reproduce this; sorry for sloppy triage.

@lampholder lampholder added P2 S-Minor Impairs non-critical functionality or suitable workarounds exist type:composer and removed X-Cannot-Reproduce labels Jun 1, 2018
@lampholder
Copy link
Member

I'm going to add a new label, console-spam, to identify all of the issues which make our error console virtually unusable.

@dbkr
Copy link
Member

dbkr commented Jun 13, 2018

I also get this every time I open dev tools, which means that if chrome dev tools is open, it breakpoints, which gets tedious very quickly.

@t3chguy
Copy link
Member

t3chguy commented Jun 13, 2018

Cannot repro :(

image

@turt2live
Copy link
Member Author

I can reproduce this very easily still :(

@t3chguy
Copy link
Member

t3chguy commented Jun 13, 2018

I know it exists, I just wish I could repro it on my machine so I could fix it
I think luk3 is looking at the slate PR so hopefully we can all put this one behind us :)

dbkr added a commit to matrix-org/matrix-react-sdk that referenced this issue Jun 13, 2018
Apparently draft sometimes gets unhappy when you try to move to the
end of an empty state, so only move to the end if we actually
created a non-empty state.

This will be irrelevant once #1890
is merged, but I have the fix now, and this is probably otherwise
going to annoy me now I'm doing things where devtools is very useful.

Fixes element-hq/element-web#6436
@dbkr dbkr closed this as completed Jun 13, 2018
williamkray pushed a commit to williamkray/element-web that referenced this issue Aug 2, 2021
* Sanitize untrusted variables from message previews before translation
Fixes element-hq#18314
* Fix editing of `<sub>` & `<sup`> & `<u>`
[\element-hq#6469](matrix-org/matrix-react-sdk#6469)
Fixes element-hq#18211
* Zoom images in lightbox to where the cursor points
[\element-hq#6418](matrix-org/matrix-react-sdk#6418)
Fixes element-hq#17870
* Avoid hitting the settings store from TextForEvent
[\element-hq#6205](matrix-org/matrix-react-sdk#6205)
Fixes element-hq#17650
* Initial MSC3083 + MSC3244 support
[\element-hq#6212](matrix-org/matrix-react-sdk#6212)
Fixes element-hq#17686 and element-hq#17661
* Navigate to the first room with notifications when clicked on space notification dot
[\element-hq#5974](matrix-org/matrix-react-sdk#5974)
* Add matrix: to the list of permitted URL schemes
[\element-hq#6388](matrix-org/matrix-react-sdk#6388)
* Add "Copy Link" to room context menu
[\element-hq#6374](matrix-org/matrix-react-sdk#6374)
* 💭 Message bubble layout
[\element-hq#6291](matrix-org/matrix-react-sdk#6291)
Fixes element-hq#4635, element-hq#17773 element-hq#16220 and element-hq#7687
* Play only one audio file at a time
[\#6417](matrix-org/matrix-react-sdk#6417)
Fixes element-hq#17439
* Move download button for media to the action bar
[\element-hq#6386](matrix-org/matrix-react-sdk#6386)
Fixes element-hq#17943
* Improved display of one-to-one call history with summary boxes for each call
[\element-hq#6121](matrix-org/matrix-react-sdk#6121)
Fixes element-hq#16409
* Notification settings UI refresh
[\element-hq#6352](matrix-org/matrix-react-sdk#6352)
Fixes element-hq#17782
* Fix EventIndex double handling events and erroring
[\element-hq#6385](matrix-org/matrix-react-sdk#6385)
Fixes element-hq#18008
* Improve reply rendering
[\element-hq#3553](matrix-org/matrix-react-sdk#3553)
Fixes element-hq#9217, element-hq#7633, element-hq#7530, element-hq#7169, element-hq#7151, element-hq#6692 element-hq#6579 and element-hq#17440
* Improve performance of room name calculation
[\element-hq#1801](matrix-org/matrix-js-sdk#1801)
* Fix browser history getting stuck looping back to the same room
[\element-hq#18053](element-hq#18053)
* Fix space shortcuts on layouts with non-English keys in the places of numbers
[\element-hq#17780](element-hq#17780)
Fixes element-hq#17776
* Fix CreateRoomDialog exploding when making public room outside of a space
[\element-hq#6493](matrix-org/matrix-react-sdk#6493)
* Fix regression where registration would soft-crash on captcha
[\element-hq#6505](matrix-org/matrix-react-sdk#6505)
Fixes element-hq#18284
* only send join rule event if we have a join rule to put in it
[\element-hq#6517](matrix-org/matrix-react-sdk#6517)
* Improve the new download button's discoverability and interactions.
[\element-hq#6510](matrix-org/matrix-react-sdk#6510)
* Fix voice recording UI looking broken while microphone permissions are being requested.
[\element-hq#6479](matrix-org/matrix-react-sdk#6479)
Fixes element-hq#18223
* Match colors of room and user avatars in DMs
[\element-hq#6393](matrix-org/matrix-react-sdk#6393)
Fixes element-hq#2449
* Fix onPaste handler to work with copying files from Finder
[\element-hq#5389](matrix-org/matrix-react-sdk#5389)
Fixes element-hq#15536 and element-hq#16255
* Fix infinite pagination loop when offline
[\element-hq#6478](matrix-org/matrix-react-sdk#6478)
Fixes element-hq#18242
* Fix blurhash rounded corners missing regression
[\element-hq#6467](matrix-org/matrix-react-sdk#6467)
Fixes element-hq#18110
* Fix position of the space hierarchy spinner
[\element-hq#6462](matrix-org/matrix-react-sdk#6462)
Fixes element-hq#18182
* Fix display of image messages that lack thumbnails
[\element-hq#6456](matrix-org/matrix-react-sdk#6456)
Fixes element-hq#18175
* Fix crash with large audio files.
[\element-hq#6436](matrix-org/matrix-react-sdk#6436)
Fixes element-hq#18149
* Make diff colors in codeblocks more pleasant
[\element-hq#6355](matrix-org/matrix-react-sdk#6355)
Fixes element-hq#17939
* Show the correct audio file duration while loading the file.
[\element-hq#6435](matrix-org/matrix-react-sdk#6435)
Fixes element-hq#18160
* Fix various timeline settings not applying immediately.
[\element-hq#6261](matrix-org/matrix-react-sdk#6261)
Fixes element-hq#17748
* Fix issues with room list duplication
[\element-hq#6391](matrix-org/matrix-react-sdk#6391)
Fixes element-hq#14508
* Fix grecaptcha throwing useless error sometimes
[\element-hq#6401](matrix-org/matrix-react-sdk#6401)
Fixes element-hq#15142
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
[\element-hq#6347](matrix-org/matrix-react-sdk#6347)
Fixes element-hq#13857 and element-hq#13334
* Respect compound emojis in default avatar initial generation
[\element-hq#6397](matrix-org/matrix-react-sdk#6397)
Fixes element-hq#18040
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
[\element-hq#6394](matrix-org/matrix-react-sdk#6394)
Fixes element-hq#18031
* Standardise spelling and casing of homeserver, identity server, and integration manager
[\element-hq#6365](matrix-org/matrix-react-sdk#6365)
* Fix widgets not receiving decrypted events when they have permission.
[\element-hq#6371](matrix-org/matrix-react-sdk#6371)
Fixes element-hq#17615
* Prevent client hangs when calculating blurhashes
[\element-hq#6366](matrix-org/matrix-react-sdk#6366)
Fixes element-hq#17945
* Exclude state events from widgets reading room events
[\element-hq#6378](matrix-org/matrix-react-sdk#6378)
* Cache feature_spaces\* flags to improve performance
[\element-hq#6381](matrix-org/matrix-react-sdk#6381)
BBaoVanC added a commit to boba-best/element.boba.best that referenced this issue Aug 3, 2021
* Sanitize untrusted variables from message previews before translation
Fixes element-hq#18314
* Fix editing of `<sub>` & `<sup`> & `<u>`
[\element-hq#6469](matrix-org/matrix-react-sdk#6469)
Fixes element-hq#18211
* Zoom images in lightbox to where the cursor points
[\element-hq#6418](matrix-org/matrix-react-sdk#6418)
Fixes element-hq#17870
* Avoid hitting the settings store from TextForEvent
[\element-hq#6205](matrix-org/matrix-react-sdk#6205)
Fixes element-hq#17650
* Initial MSC3083 + MSC3244 support
[\element-hq#6212](matrix-org/matrix-react-sdk#6212)
Fixes element-hq#17686 and element-hq#17661
* Navigate to the first room with notifications when clicked on space notification dot
[\element-hq#5974](matrix-org/matrix-react-sdk#5974)
* Add matrix: to the list of permitted URL schemes
[\element-hq#6388](matrix-org/matrix-react-sdk#6388)
* Add "Copy Link" to room context menu
[\element-hq#6374](matrix-org/matrix-react-sdk#6374)
* 💭 Message bubble layout
[\element-hq#6291](matrix-org/matrix-react-sdk#6291)
Fixes element-hq#4635, element-hq#17773 element-hq#16220 and element-hq#7687
* Play only one audio file at a time
[\#6417](matrix-org/matrix-react-sdk#6417)
Fixes element-hq#17439
* Move download button for media to the action bar
[\element-hq#6386](matrix-org/matrix-react-sdk#6386)
Fixes element-hq#17943
* Improved display of one-to-one call history with summary boxes for each call
[\element-hq#6121](matrix-org/matrix-react-sdk#6121)
Fixes element-hq#16409
* Notification settings UI refresh
[\element-hq#6352](matrix-org/matrix-react-sdk#6352)
Fixes element-hq#17782
* Fix EventIndex double handling events and erroring
[\element-hq#6385](matrix-org/matrix-react-sdk#6385)
Fixes element-hq#18008
* Improve reply rendering
[\element-hq#3553](matrix-org/matrix-react-sdk#3553)
Fixes element-hq#9217, element-hq#7633, element-hq#7530, element-hq#7169, element-hq#7151, element-hq#6692 element-hq#6579 and element-hq#17440
* Improve performance of room name calculation
[\element-hq#1801](matrix-org/matrix-js-sdk#1801)
* Fix browser history getting stuck looping back to the same room
[\element-hq#18053](element-hq#18053)
* Fix space shortcuts on layouts with non-English keys in the places of numbers
[\element-hq#17780](element-hq#17780)
Fixes element-hq#17776
* Fix CreateRoomDialog exploding when making public room outside of a space
[\element-hq#6493](matrix-org/matrix-react-sdk#6493)
* Fix regression where registration would soft-crash on captcha
[\element-hq#6505](matrix-org/matrix-react-sdk#6505)
Fixes element-hq#18284
* only send join rule event if we have a join rule to put in it
[\element-hq#6517](matrix-org/matrix-react-sdk#6517)
* Improve the new download button's discoverability and interactions.
[\element-hq#6510](matrix-org/matrix-react-sdk#6510)
* Fix voice recording UI looking broken while microphone permissions are being requested.
[\element-hq#6479](matrix-org/matrix-react-sdk#6479)
Fixes element-hq#18223
* Match colors of room and user avatars in DMs
[\element-hq#6393](matrix-org/matrix-react-sdk#6393)
Fixes element-hq#2449
* Fix onPaste handler to work with copying files from Finder
[\element-hq#5389](matrix-org/matrix-react-sdk#5389)
Fixes element-hq#15536 and element-hq#16255
* Fix infinite pagination loop when offline
[\element-hq#6478](matrix-org/matrix-react-sdk#6478)
Fixes element-hq#18242
* Fix blurhash rounded corners missing regression
[\element-hq#6467](matrix-org/matrix-react-sdk#6467)
Fixes element-hq#18110
* Fix position of the space hierarchy spinner
[\element-hq#6462](matrix-org/matrix-react-sdk#6462)
Fixes element-hq#18182
* Fix display of image messages that lack thumbnails
[\element-hq#6456](matrix-org/matrix-react-sdk#6456)
Fixes element-hq#18175
* Fix crash with large audio files.
[\element-hq#6436](matrix-org/matrix-react-sdk#6436)
Fixes element-hq#18149
* Make diff colors in codeblocks more pleasant
[\element-hq#6355](matrix-org/matrix-react-sdk#6355)
Fixes element-hq#17939
* Show the correct audio file duration while loading the file.
[\element-hq#6435](matrix-org/matrix-react-sdk#6435)
Fixes element-hq#18160
* Fix various timeline settings not applying immediately.
[\element-hq#6261](matrix-org/matrix-react-sdk#6261)
Fixes element-hq#17748
* Fix issues with room list duplication
[\element-hq#6391](matrix-org/matrix-react-sdk#6391)
Fixes element-hq#14508
* Fix grecaptcha throwing useless error sometimes
[\element-hq#6401](matrix-org/matrix-react-sdk#6401)
Fixes element-hq#15142
* Update Emojibase and Twemoji and switch to IamCal (Slack-style) shortcodes
[\element-hq#6347](matrix-org/matrix-react-sdk#6347)
Fixes element-hq#13857 and element-hq#13334
* Respect compound emojis in default avatar initial generation
[\element-hq#6397](matrix-org/matrix-react-sdk#6397)
Fixes element-hq#18040
* Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
[\element-hq#6394](matrix-org/matrix-react-sdk#6394)
Fixes element-hq#18031
* Standardise spelling and casing of homeserver, identity server, and integration manager
[\element-hq#6365](matrix-org/matrix-react-sdk#6365)
* Fix widgets not receiving decrypted events when they have permission.
[\element-hq#6371](matrix-org/matrix-react-sdk#6371)
Fixes element-hq#17615
* Prevent client hangs when calculating blurhashes
[\element-hq#6366](matrix-org/matrix-react-sdk#6366)
Fixes element-hq#17945
* Exclude state events from widgets reading room events
[\element-hq#6378](matrix-org/matrix-react-sdk#6378)
* Cache feature_spaces\* flags to improve performance
[\element-hq#6381](matrix-org/matrix-react-sdk#6381)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants