Kendo-ui-core: Context menu cannot undo pasted text

Created on 20 Jun 2016  路  4Comments  路  Source: telerik/kendo-ui-core

Calling undo from the context menu after pasting text does not undo it. Maybe the context menu command does not go through the editor undo/redo stack? Either way, this is confusing for users, as it undoes some text, but not all.

Reported in ticket ID 901851

Bug Editor Low jQuery2

All 4 comments

Two years later there is still no suitable event to handle the undo command from the context menu. Theoretically, the input event is the one we could use (InputEvent). Where the inputType property shows the type of the change occurred. This, however, is available only for Chrome and Opera.

Another solution is to prevent the native context menu and implement a custom one. If this is what we are after, this should be logged as an enhancement.

At the time of writing, I was considering detecting input events after the contextmenu event is triggered. Not sure if this is a viable option implementation-wise, though.

There are several troubles with that:

  1. IE and Edge does not utilize the input event for contenteditabe elements at all.
  2. Firefox, we could possible get the input event, but without the inputType we could not know whether undo or redo is executed from the context menu.

Closing this issue due to impossibility to be handled in all browsers consistently. If there is further demand, the solution would be to entirely prevent the context menu and show a custom one. This, however, should be processed as a feature request.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ipeshev picture ipeshev  路  4Comments

ipeshev picture ipeshev  路  4Comments

CSP
aersamkull picture aersamkull  路  4Comments

andreluizbellon picture andreluizbellon  路  5Comments

zdravkov picture zdravkov  路  5Comments