-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix(ie): Remove selection type check #574
Conversation
Will separate polyfill to a ts file. |
src/document/docUtil.ts
Outdated
} | ||
} | ||
|
||
export function isIE(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be avoided by checking for a different property on the selection and/or range(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at Selection.prototype
and Range.prototype
in IE console and didn't find any similar property, unfortunately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is checking isCollapsed
and rangeCount
adequate? Can rangeCount
be non-zero for a Caret selection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think isCollapsed
itself is adequate. rangeCount
is 1
for Caret
selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find rangeCount
is 0
for None
type selection. So yeah I think we can remove type check.
eda38fb
to
99e45e2
Compare
No description provided.