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

fix error when destroying editor in iframe #4330

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

nightwing
Copy link
Member

fixes error thrown if destroy is called while mouse is pressed, or when captureEnd was not fired because of iframe

@@ -108,18 +108,19 @@ exports.getButton = function(e) {
};

exports.capture = function(el, eventHandler, releaseCaptureHandler) {
var doc = el && el.ownerDocument || document;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I expand doc then it becomes document, but the document variable already exists. What's the difference between doc and document and can you reflect that in the name of doc ?

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #4330 into master will increase coverage by 0.11%.
The diff coverage is 97.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4330      +/-   ##
==========================================
+ Coverage   71.92%   72.03%   +0.11%     
==========================================
  Files         536      536              
  Lines       52245    52300      +55     
  Branches     9730     9738       +8     
==========================================
+ Hits        37575    37676     +101     
+ Misses      14670    14624      -46     
Flag Coverage Δ
#unittests 72.03% <97.77%> (?)
Impacted Files Coverage Δ
lib/ace/mode/swift_highlight_rules.js 91.11% <ø> (ø)
lib/ace/mouse/touch_handler.js 89.61% <71.42%> (-0.62%) ⬇️
lib/ace/commands/default_commands.js 75.12% <100.00%> (+2.02%) ⬆️
lib/ace/config_test.js 98.30% <100.00%> (-0.03%) ⬇️
lib/ace/edit_session/folding.js 73.84% <100.00%> (+8.88%) ⬆️
lib/ace/edit_session_test.js 98.17% <100.00%> (+0.05%) ⬆️
lib/ace/editor.js 77.81% <100.00%> (+0.03%) ⬆️
lib/ace/layer/font_metrics.js 89.68% <100.00%> (ø)
lib/ace/lib/event.js 63.59% <100.00%> (+0.16%) ⬆️
lib/ace/mode/asl_highlight_rules.js 100.00% <100.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c24710...e8babcd. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants