Bug #12601
openWTableView sends "mouseDown" event with wrong Event.target property
0%
Description
Hello,
When you click on a table cell, the Wt-spacer
object sends an event where #document
is set as the target instead of the cell or the table itself.
Reasons not to use #document:
The #document
element encompasses the entire HTML document, including the <html>
, <head>
, <body>
, and all other elements. So, when you use #document
, you get the entire document, which might lead to unexpected behavior since you may not intend to work with the entire document.
If you want to access specific parts of your document, such as a particular <div>
element or an element with a specific ID, it's best to target the element directly. The #document
element is too general and not specific enough for most use cases.
When someone reads or maintains your code, it's more helpful and understandable if you directly access the specific elements you're working with rather than the entire document. This increases the flexibility and maintainability of your application.
Malfunction of event-based functions, specifically in the case with the external library "Syncfusion", the component checks the last selected element in the FocusOut event. The property classList is checked for existing classes. The WT table returns #document as the target. This is only a pseudo element and does not have the property, which in turn leads to an error.
No data to display