Skip to content

[Bug]: Don't trigger element insertion when focused inside a text field / inside custom CSS #7

@jrmyfranck

Description

@jrmyfranck

Contact Details

hello@jrmyfranck.com

What happened?

Currently, Structeezy shortcuts fire the corresponding insertions regardless of context.

While handy to quickly add elements to the page, it can trigger unwanted insertions.
It's especially problematic with the default shortcuts, when trying to add custom CSS to an element on a mac:

  1. I'll focus in the custom CSS field
  2. I'll type "%root%"
  3. I'll then intend to open my code block by typing "{", but this requires me to press the "alt" and "(" keys (for context, the open parenthesis key (() is also the 5 key
  4. Structeezy adds an <h5> element to the page

Potentially the same issues could occur when trying to type a "œ", "æ", etc., ie. in a text field

Version

v0.4.0

Version

v1.9.1.1

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

🔧 in progressDevelopment is in progress🪲 bug confirmedThe bug could be reproduced and is confirmed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions